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?
I don’t know what that means. For me to help you, I need to know the answer to my specific question. Is it showing zero on both screens? Have you removed the stored variable blocks?
Can you share the project link with me? It’s hard to troubleshoot without seeing what you’re seeing.
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.
Hey,
So i tought i got it working. But it’s not now so i really don’t understand why it can’t find the cordinate’s! I really tried everything i tought might be the error.
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…
This is entirely dependent on the level of accuracy of the comparison.
For example, if the onMarkerPress gives you a Lat value of 51.284080201 and your Airtable has 51.28408020 (without the last 1) then there will be No Match.
Best is to show the numbers obtained from the onMarkerPress and check if they really are available in your table.
Ohhh, this might explain it. Because it looks like my output is more specific than my airtable. But how would i make airtable more exact or onmarkerpress less acurate?