Hello guys,
I am trying to read and write data to a google sheet through mit app inventor
Until now with the basic tools that I used for designing the application, I am able to write data through a google form and read data through the google sheet.
I am trying to listview the data that i am receiving from the google sheet
ISSUE: The listview updates only when the screen is initialized, How do i get it to update in real time when i am submitting data to the sheet?
I want the list to update even when i am adding the data to the list from some other device lets say my computer using the google form link as well
For your reference I have attached the blocks image here below
Make a procedure for the blocks in your “Refresh” button click event, then call that when you have submitted data.
You won’t be able (easily, if at all) to update if data is submitted by another device, you will have to press the refresh button (you could set this with a timer to update at suitable intervals)
well thank you for your suggestion, bu unfortunately your solution didn’t work
Anyways i got a new solution to my problem
I realized that event When.reading.gottext gets activated only once every time I open the screen1
So I looped Screen1 to open when receive button is pressed by opening and closing another screen2.
I also did some text validation for my form.
If you can help me improve the animation time and type of opening and closing of screen2 that would be great.
Okay I understand that it is not a good practice and anyways it was working when I used it in the companion screen but when I built the app and tried to run it in my phone I had the same issue again
How would I re run the when got event
I can call the get read event whenever I want but the when got event is the only thing I want to rerun which I am not able to find a way for
You have to call the get event to run the got event.
Run the get event every time you want to update your data. In the example below, pressing Button1 will fire the get event and return the data in the got event, just one. Pressing Button2 will start a clock timer which will fire every minute and then fire the get event to return the data in the got event. This will happen every minute until you stop the clock