Fetch Data from Airtable Based on Device_ID on Home Screen Initialize

Hello everyone,

I am developing an app where users register through a Sign Up screen, and their Device_ID along with their information is saved in Airtable.

Now, I want the following functionality on the Home Screen:

  • When the Home Screen initializes, the app should fetch data from Airtable.
  • It should find the record matching the user’s Device_ID.
  • Based on the Payment_Status value of that user, the app should display the appropriate arrangement:
    • If Payment_Status = “YES”, the app should make Course_Vertical_Arrangement visible.
    • If Payment_Status = “NO”, the app should make Home_Vertical_Arrangement visible instead.

In short, I want every user to see a specific arrangement on the Home Screen according to their own Payment_Status.

I would really appreciate any guidance on the correct blocks or the best method to achieve this functionality.

Thank you!

image

try this filterByFormula method

Also read this guide

Both. Using device id get the status,
If the status is yes proceed further
Else do the no process

Thank you so much for your reply and for guiding me towards the filterByFormula method!

I really appreciate your help. :folded_hands:

Actually, I am still a beginner in using Kodular and Airtable API queries, so I am having a bit of difficulty understanding and implementing this method properly.

If possible, could you kindly show me the necessary blocks or share a small sample project where this is implemented?

It would be a huge favor for me and would help me understand much better.

Once again, thank you so much for your time and support! :glowing_star:

In the above oost, just add your airtable tabke name, api key also add the search columne name, and set the search taxt as device id.

If matches found you will get row values matching data. From this data take the second item which will give you yes ir no.

This is the logic

Thank you so much for giving your valuable time and sharing the detailed logic! :folded_hands:

I am still a beginner in Kodular and Airtable integrations. I understood the idea you shared about using filterByFormula and fetching the data based on the Device_ID, then checking the payment status (“YES” or “NO”).

However, because I am still learning, it’s a little difficult for me to understand and implement it properly just by logic explanation.

If possible, could you kindly share the sample blocks for this? Or maybe a simple AIA file example (even a basic one)? It would be a huge help for me to learn and implement it properly.

Thank you again for your kindness and support. It really means a lot! :folded_hands::sparkles:

this block is used to call the whole table as a json list

here, after the Bearer there must be a space

this code is used to filter the row based on input condition ( must use Hypen at the end)

here,
1 denotes the col name
2 denotes the matching value in that col

in the above example, i want to look the row value so i am using the condition as Name col mathcing value as Name 417, and i expected the total row to display. As i guess i got the output.

If no matching found it will throw empty result see.

I hope now you know how to use this…

Process.

When user logged in or signed in, Get device ID
Run the filterByFormula using this ID using its col name.
You will get the total row, and from this look the value of payment status.

Got it?, i hope you understand