When selecting spinner 1, I want spinner 2 to show information only about the product chosen in spinner 1.
Example: If I choose “Camera”, spinner 2 should only show “GS0372 and GS0375”
Hi, probably you have to study and save data in a different way to manage better the query and the search inside the table.
Anyway I think you have 2 ways .
1- make a query and save data like dictionary so you can use the dictionary’s block to make you search. Here a GUIDE to see how dictionary works about search.
2- More expensive . You have to work with variable and list and with some cicles manage the data .
Ex. Call the column A and B , save them in two variables, then manage A with a temp variable and with a for each item if item is not in list you add it to a temp list, so you will have a new list without copy to show inside spinner.
When you select the first spinner , you need a new for each item in list A where if item= select spinner you have to add the index of the item in a temp list. Now you have a list with all the index you have to take in list B , with a for each inside this temp list you have get the right items in list B (select list item list B index item (from for each )
yeah but that’s my problem. I don’t know how to do this in blocks
I only know how to modify a logic structure, but I don’t know how to create it from scratch. I’ve been stuck on this spinner for a long time
Procedure block is not necessary you can add the inside code where you want, I added a procedure to call easy and test it.
This block take the list from csv (if I remember right every item of list from CSV is a row) and create a dictionary with numbered keys, every keys is a row of the table and inside you can find all the titles of the columns and the values. In this way with the block list by walking you can easy get a column like a list, in the example a list of produto. If you change (text under walk all at level) produto with modelo you will get the column modelo. Refer to the guide for more examples.
Now if you have a list of produto and want to clear from duplicates, here the code.
For each items it checks if it’s in the Temp list to add or not the values, the new list is ready for spinner.
I understood your logic, but I couldn’t. I’m sorry. I don’t know where to call the procedure
is it on the block “initialize” or “got text” from web, or other?
how to link to google spreadsheet?
Is this way right?
I made the blocks like yours. I disabled some of my blocks to fit your logic, but I couldn’t
Ok , I add more information.
My list from CSV is like yout name variable , it has to receive web response with the list from CSV block , I don’t know where you use it in your project but in this code you can change them each other .
Under name variable you have to add procedure to fill your dictionary database.
I made these changes because the following error occurred:
but the second spinner is not working. the error shows me all the information in column B, but not in list format.
when I select an option in the first spinner, the following error happens: