Skip to main content
Solved

Merge two lists with multiline string


Forum|alt.badge.img

Hi all,

i would like to concatenate values from 2 lists (maybe 3 later) from 2 fields. The values are in multiline. I can get values with attributesplitter and a listconcatenator but after that, i don't find the solution!

image 

imageimageAfter the 2 listconcatenator, I tried the featureMerger but It don't gives me the two new values -concatened and _concateneddate.

imageIf someone could help me, it would be very nice!

Thank you!

Best answer by chrisatsafe

Hi @kael112​ ,

How are you expecting the output to be formatted?

Ligne_92
Lianes_7
15:31
15:31

OR

Ligne_92, 15:31
Lianes_7, 15:31

If the former, a StringConcatenator will do the trick but I suspect this isn't what you are after. If the latter, you can explode the list after splitting the attribute, join, then concatenate using an AttributeManager (to format each line) and an Aggregator (to concatenate into multiline string again). 

2022-06-21_13-54-04Hope that helps. If that's not quite what you are after, please include how you would like to see your output attribute values formatted. 

View original
Did this help you find an answer to your question?

3 replies

chrisatsafe
Contributor
Forum|alt.badge.img+2
  • Contributor
  • Best Answer
  • June 21, 2022

Hi @kael112​ ,

How are you expecting the output to be formatted?

Ligne_92
Lianes_7
15:31
15:31

OR

Ligne_92, 15:31
Lianes_7, 15:31

If the former, a StringConcatenator will do the trick but I suspect this isn't what you are after. If the latter, you can explode the list after splitting the attribute, join, then concatenate using an AttributeManager (to format each line) and an Aggregator (to concatenate into multiline string again). 

2022-06-21_13-54-04Hope that helps. If that's not quite what you are after, please include how you would like to see your output attribute values formatted. 


Forum|alt.badge.img
  • Author
  • June 21, 2022
chrisatsafe wrote:

Hi @kael112​ ,

How are you expecting the output to be formatted?

Ligne_92
Lianes_7
15:31
15:31

OR

Ligne_92, 15:31
Lianes_7, 15:31

If the former, a StringConcatenator will do the trick but I suspect this isn't what you are after. If the latter, you can explode the list after splitting the attribute, join, then concatenate using an AttributeManager (to format each line) and an Aggregator (to concatenate into multiline string again). 

2022-06-21_13-54-04Hope that helps. If that's not quite what you are after, please include how you would like to see your output attribute values formatted. 

Hello @chrisatsafe​ ,

I would like a string like the second . Tomorrow, i will try your script and I will tell you if it's ok!


Forum|alt.badge.img
  • Author
  • June 22, 2022

Hello @chrisatsafe​ ,

yeah it's work! Thanks a lot for your help!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings