when selectin the date 5-1-2024 it returns results from 5-12-2023
In Addition there is another variant of the block where it returns only the first result where actually there are many results that meet that criteria
Your problem is the [gear] list block. Remove it. It’s almost always a bad idea to use it unless you’re initializing a list.
With it included, you’re creating a list of a list because the list of values block is already a list. This may be why you’re only getting one result. Your loop only has one item (a list of a list instead of a list of items).
An example is if your spreadsheet column contained:
apple
orange
lemon
Then the list of values block would create a list like this with three items:
{apple,orange,lemon}
But by adding the [gear] list block in front of that, it creates a list like this with only one item:
You may need to refresh the data viewer after your loop.
Can you post a link to your project?
Edit: actually, I see your mistake. For every iteration of the loop, you’re checking to see if the entire list contains the search term. Instead, you need to check if the item i equals the search term.
Sorry, I was a little took quick in my explanation. You’re using i as the loop counter. So it doesn’t make sense to compare that to your search term (1=“Cola”?, 2=“Cola”?). You have to use the for each j in list block and compare j (the list item) to the search term.
The row id cannot be the value in j. So here’s the slightly tricky part: if you count with a loop variable that is an integer such as your earlier example with i, you can’t use that to search for a search terms. But if you use a string as in your example with j then that is not a valid row id.
My suggestion is to create a variable called app variable Row and set it to 0 before the for each item j in list loop and then within the loop, change its value by 1 before the if block. Then, if j=app variable Selected Date, you use app variable Row as the row id in your create row block.