Skip to main content
Solved

Merge two lists with multiline string

  • June 21, 2022
  • 3 replies
  • 49 views

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. 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

chrisatsafe
Contributor
Forum|alt.badge.img+2
  • Contributor
  • 606 replies
  • 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
  • 20 replies
  • 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. 

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
  • 20 replies
  • June 22, 2022

Hello @chrisatsafe​ ,

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