Hello, i’ve been trying to make an app that sends you to another page when you click on a marker. I also need to know in which row of my airtable the marker was. I’ve been looking a lot in the community but i still can’t seem to get it working
Have you verified that the “latitude” and “longitude” values of the green event block exactly match values in your Airtable column? Have you assigned labels to each of the four values (two lat/lon pairs) you’re testing to make sure you’re seeing what you expect them to be?
Your blocks look really convoluted to me. Why not just use “find first occurrence of” block in the List drawer to see if the “list of values” from Airtable contains the lat/lon value you are getting from the event block? If the result of the “find first occurrence” block is 0, it isn’t found. If it’s a number greater than 0 then it refers to the row it was found in.
When i click on a marker my program is supposed to save from which row it was and set the row in which it was found to a variable. But when i get to another page and i try to use the variable again it seems that it has reset to 0. So i’m not sure what to do with this!
Stored variables are a special situation. You have to check to see if they are null when the screen opens and if so, set them to an initial value (e.g. 0). I don’t know why this is and it’s something Thunkable should just do in the background.
Let’s remove the stored variable and see if that’s the problem. What happens when you set a label’s text to app variable found in row # in the original screen and in the Winkel info screen? What are the two values that you see?
If your app variable found in row # equals zero then it means that the lat/lon value was not found in your database when you used the “find first occurrence” block. So you need to figure out why those values are not matching.
I just noticed a problem with your blocks. You are finding the first occurrence of app variable ThisLong for both longitude and latitude.
Hmm… sadly enough this still hasn’t fixed the issue. It did make it output the cordinates but it seems like it can’t find the cordinates in the airtable and i really don’t understand why it doesn’t find them…