My database has several thoussand rows. My app offers 6 different dropdown lists that act as filters. By the time the user has selected from all six lists, one row is left. I want to use that row number (unique ID) to reference other variables on that row.
- What is the proper syntax for the value of Set State to filter data and return the unique ID?
- How do I then use that unique ID to return variables in other columns of that row?
keith
2
If by “row” you mean a Thing (and why don’t you just say so?), a Thing’s unique ID is just That_Individual_Thing’s :unique id.
Thanks Keith. One of the hurdles of learning to use a new tool is definitely the vocabulary, so thanks for that. My question is how to point to That_Individual_Thing. Maybe by using :first item?
Hey @nathanlively
:first item will return the first item in a list. So if by the end of this process you’re returned a list, and if you’re certain that the only item on that list will be the one you want to target, the :first item method will work great. Once you select :first item, it’s just a matter of selecting whatever field you’re interested in from there. If I’m interested in getting the first_name of the first User from a list of users, for example, it would be something like: List of Users :first item’s first_name (or something that looks similar to that).
1 Like