Great post!! I’m trying to figure out the reverse now.
Here is the scenario
When page opens, USERID (Variable) identified
Google Sheets Data Source uploaded and displayed
When going to update values in DB, the app would first search the list of USER ID’s in the DB and find the cell that needs to be updated based on matching the stored variable in the app.
example:
Google Sheet DB
Column 1: UserID Column 2: Current Long Column 3: Current Lat
R1: bryanruddy0346 R1: -78.35362627636 R1: 35.9898457575
R2: dennissmith1111 R2: -78.436463732763 R2:35.4654763233
R3: dustinshane3545 R3: -78.222443434 R3: 35.6869847474
User logins and in creates user ID stored variable with inputs “dustinshane3545”
When clicking an update button, the function would filter through google db and establish the row that needs to be updated. Insert new lat’s and long’s from sensor data into the appropriate cells.
That way a user is not creating new entries all day. Then the app would have to filter out latest input with a time stamp. Which I could do. That seems like a lot of code.
I have coded the functions to retreave matching data.
Just want to update matching data
tatiang/manyone and I were working on some ACOS , SIN, details in another post. Getting more accurate numbers through the calculations through the sheet.
The calculations speed is quite good. Just need to have user update appropriate data as they use the app.
From the blog from Muneer on filtering data that match criteria, I was not sure if the code available can identify within the Data Resource (Google sheet) a specific row and cell to send back an update.
Okay, I think I understand. Is your question: “How do I find the user’s user id in a column in a Google Sheet and then update other column values in that same row?” If so, that’s essentially a vlookup and it’s been discussed before on the forums.
When a button is pushed to update the current lat and long, the label doesnt revise with the new google sheet data. The data is sent to the sheet, I can see the new calcualtions. But UI doesnt update.
I would prefer not to have tons of list viewers within the app.
I have tried creating a new label and making the old one not visible. But it still returns old values.
It works , but returns all the current values in that column. Was trying to match via a unique user ID and return the correct single value in that column.
Can you have a Firebase path with a space in it (“Red Yards”)?
Is there a reason your loop uses the i variable to count but the j variable as the row id?
How were you trying to do that? I don’t see evidence of that in the screenshot above. Also, it’s best to avoid forever blocks in a situation like. Why are you using a loop inside of a forever block? Also, what is the purpose of the if condition you’re using? Are you just trying to see if the text input is not blank?
Lastly, putting the break out of loop block inside of the loop without a condition to trigger it means that the loop will only fire once. And because it’s not in the “do” section either, it may actually trigger before the get value at path block has time to complete.
Before using the row object , the value block works. It just doesn’t update correctly.
If it did , the rest would be solid.
The way the app works:
I can link the project as well.
User creates login - saves user login as stored data
once stored data has value, user is moved to action selection page.
user device runs current lat and long and when finished allows for the user to select action. I have also programmed at that time the system to identify the unique row ID in Google sheets. Linked as data source
when the user selects range , the username / lat / long are sent to the appropriate row line. That current works.
when range is open , I have it setup to pull the unique values of preferred columns matching the user id.
player wants to check current location. Presses button to reload device lat and long.
System sends the data back to Google sheet. Sheet calculates.
But the label values that are tied to the sheet data doesn’t update.