First I opened a csv file and captured it into a global variable.
Now I need to loop through the global variable and get the individual fields
the variable looks like this:
["Name,Address,Number","Fred,RSA,555","James,USA,666"]
I need to search for RSA and only show the RSA fields, and only the name and number fields.
So first I need to split the variable into the different "records" and then search the "fields" for whats needed.
Taifun
2
where is the data coming from?
you might want to work with a database, which offers filter options...
for example if you use a SQL database, you could filter easily like this
SELECT Name, Number FROM myTable WHERE Address = "RSA"
Taifun
Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.
This list is from a variable which has the [ ] brackets as well, will this remove them and or ignore them?
TIMAI2
6
My blocks make an AI2 list like this:
[["Name", "Address", "Number"], ["Fred", "RSA", "555"], ["James", "USA", "666"]]
and return Fred and 555 in the labels, no double quotes or brackets.
If I assume your "list" is coming from the csv file without brackets:
"Name,Address,Number","Fred,RSA,555","James,USA,666"
and you then make a list with the list from csv row block, you could use these blocks:
ABG
7
See this very similar thread ...