The list gets displayed in raw format how do I fix it?

I do this

Then I do this


I get the display in a list orderly
However when I do this it gets displayed in raw format

The good format looks like this
Rice
Chapathi
Dal
VagSambar
NonVegSambar
The raw format looks like this:
Tag
FoodItem:["Rice", "Chapathi", "Dal", "VegSambar", "NonVegSambar"]
How to make this display as
Tag
FoodItem: Rice
Chapathi
Dal
VagSambar
NonVegSambar
Or close to this instead of the raw format.
I have to do makelist/join and all those in my real program. The first method is just to give an example. Thanks in advance

Set global foodDisplayList to foodItemSetList1 only.

Thanks Gordon but it did not work. This is how it looks now:


Case 1 raw format case 2 works fine.

Delete the set FoodItemSelList1 blocks and try again. It was perfectly fine and now you are setting it to a new list.

1 Like

Sorry I was not clear. In my real program I have to do the join, make a list I cannot avoid it. So my first way of doing was right, I start off with a empty list. The make a list or the join causes the problem. Thanks again

It appears that the variable global FoodItemSelList1 contains a list, given what you have shown.

If you want to display that list in a listview, then just connect global FoodItemSelList1 to Listview Elements.

If you want to add items to that list, then use the addItem list block or the insertItem list block.

If you want to create a new list, then use the copy list block (otherwise you just have the same list)

2 Likes

I like the JOIN WITH SEPARATOR \n block to turn a list into a multi-line text value.

2 Likes

I tired TimAI2's and yours. \n was the easiest option out. It improves the UI far more than a single line. Thanks a lot ABG

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