Concatenating 2 lists and displaying them in a Simple List

Hello,

Sorry for the simple question but it does not make sense to me. I have a Main List and a SubList. Independently they both display fine. When I insert the SubList at the end of MainList and then display the SubList content comes out as a single line. What am I doing wrong? Thanks
https://x.thunkable.com/copy/8476921a12ae8ccb64ac76f11020011e

A list is different than a number or text string.

You created the list {1,2,3} and then told Thunkable to add the list {101,102,103} to the end of that list. So it did and you got {1,2,3,{101,102,103}} which is an embedded list and tricky to work with. The fourth item of that combined list is a list itself.

What you wanted, I assume, is {1,2,3,101,102,103}.

For that, you would need to loop through each item in the sub list and add that item to the end of the main list.

Or, if you prefer not to use a loop, convert each string to text, join them (with a “,”) and then convert back to a list. For that, you would use the Make List from Text block: Lists Blocks - Thunkable Docs

1 Like

Done!! I used the loop it was easy and elegant. Thanks a bunch!!
https://x.thunkable.com/copy/0f836fa07ce995f1382754b6b1b44f61
Cheers
ananda

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.