Getting Values From Airtable Problem

Hello Koders ,
In a previous project that retrieve prices from airtable , i got this problem that each item retrieve all 4 prices instead that each item fetch its own priceScreen Shot 2020-09-06 at 4.43.30 AM

i know i may have to use lists but i am a little confused on how to use the list in here please take a look at the screen shoots:

You are getting a list for all the prices, you need to parse every content of the list to each one of your labels.

blocks(1)

1 Like

Thanks for fast reply i will try it !

Does the image of the blocks loaded??? I uploaded a image of the blocks you need, but it doesnt appear in my browser

blocks(1)

1 Like

yes i can see the blocks , should i repeat the same stem on initializing screen too ?

If you need the information from the start, you can put it in Screen initialize, but you can also add a timer in the Screen initialize to request the data and then display it

if you take a look at my blocks am using tinydb to cache a copy of the prices that can be read offline thats why i asked to repeat it in the initialize , want me to send aia file to check better ?

When the procedure is Offline, you will need to parse the list again from the TinyDB, and you need to be sure that there is data in the TinyDB before you parse the list.

For example, in the “value if tag not there” put a “null” and if there is no data in the TinyDB, then the Null will appear, if the Null appears, then show a notification that they need to connect to the internet to show and store the prices

1 Like

Thank you for this info , i sent you my aia please if you can check if my blocks are correct and tiny db is caching a copy for the pricesPrice_List.aia (3.4 KB)

It should see something like this

Also remember to erase all the keys and tokens from your databases if you are going to share an aia file.

1 Like

Oh great i will make the changes and test it , thank you so much compadre

1 Like

thanks for remembering that !

1 Like

everythings works just fine after testing apk file , but i still have one last question regarding those blocks
in offline mode it retrieve the last saves price from airtable into tinydb ! but when i change again the price change online mode but tinydb still store the first value retrieved should i add a btn to refresh or we can force tinydb to store always the new value ?

Screen Shot 2020-09-06 at 6.11.42 AM

Everytime your apps open with a connection, you should refresh the values in the database. You can fix this by simply adding a StoreValue at the end of retrieving the data from airtable. See what I did at the end of Got Column.

1 Like

Alright i will test again ! :slight_smile:

Works good now thank you so much :slight_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.