List block issue to purge

Hi , I get confused with list block, a little help pls.
I have 2 lists I can add, remove item of them my procs seems to work.
Issue is when I want to clear both lists I got "Bad list argument to foreach - the second arg to Foreach is not a list. the second argument is "".
As it can be seen I use the same code from Init screen and app start with blank lists.
The issue is only with Proc ClearAllNb.
Please where is the error?

Part of Init Screen
PartOfScreenInit

You probably need an if empty list condition in your two procedures list phones and list emails.

If list empty then set label to blank text, else for each item ....

Thanks for yr reply. I have done that:
ShowList


Now I've a blank lines,blue & green, I would like to fill those lines Showing headline Phone & Email as I write in designer mode
Well I must explain those 2 lists are side by side on the screen. When I add a contact It goes on the first line as I wanted replacing Phone & Email.
Hope I am clear enough.
Thank for tour time.

Perhaps experiment with layouts What happens with Layouts?

It might not make a difference to the displayed output, but those loops are unnecessary in your ListEmail and ListPhone procedures. The inner JOIN With Separator gives you the whole list.
You are just repeatedly overwriting the Label with the same data each loop.

The each loop let me get neat list without coma (,)
I modify my code as


Adding , removing & clearall is fine except The [" "]
learning is a long process.

See

and use this board's translate feature for your language.

Thanks to all and @ABG for the link. But I believe I am beyond that point.
I have already done the purge with a down loop but I wanted to do something more efficient as : delete Tinydb tag update list and screen.
If it is just a very simple code I am missing please show it. The process to do that interest me and could be useful to other people. Regards.

Assigning a list to a text area results in AI2 identifying the text as having come from a list the lazy way.

To avoid them, use the JOIN WITH Separator ',' block to get a more natural looking text value.

Some use \n as a separator, when they want one item per line.

Thanks.

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