Good morning, I ask you for precious help, I would like to concatenate two separate fields in a Listview: phone number + name. Then by selecting a ListView row I have to extract only the phone number to configure a field that will contain a setting. I post apps that I currently use with 2 listviews but I would like to simplify with just one. Thanks to everyone in advance.
When screen i initialise (imagine both list have equal length of item)
Initialise on local variable to create empty list
For each number from {1} to {length of list 1} by {1}
Set local variable to join {select list item {list 1} index {get number} use join block with your desired symbol select list item {list 2} index {get number}
After list view picking
Set name label to select list item {list 1} index {listview selection index}
Try the same for another lable with list 2
I suggest storing names as tags, and numbers as values for the corresponding name tags.
That keeps them together.
Also search this board for YAML
Thanks for replying, but could you kindly suggest an example with tag names.
Thanks ABG for your suggestions, I partially solved the problem, storing in the listview the two fields separated by a hyphen, like the code you see. Now I have to extract from the string the phone number that is before the hyphen, and the name that starts after the hyphen. Could you help me, with the examples of string manipulation that I found I could not. Thanks
try something like this
this will give you upon selected lists phone number phone numb field and name in name field
no use of this variable and tinydb tag
Learn to use tables (lists of lists)
Thanks it works. I ask you for a little help, there is the possibility to comment on a block, I tried with right click add comment but nothing happens. Also there would be the possibility to copy a block from an app to import it to another app. Thanks
it will work. do not worry. me to suffer with this but upon refresh or drag and drop random blocks it works