Firstly, thank you for this tool… i’ve just started using it but i love the way the logic can be structured.
I’ve just started a new app and have hit a wall. I have managed to add a REST API direct connection to my test db in Airtable. When I run the test i get a response with the correct fields and values stored in them.
Lets call this the master table which gets read only once when the app is launched.
I then want to duplicate this table on the client side and access the values from the “clone” table to feed the app. However, i cannot figure out how to transfer these values. I have tried using app variables, data variables and page variables but cannot seem to draw the data into the app.
If someone has a step by step guide, please post it here.
What I do is get the record collection, set the data variable, then set a page variable using the “Map” function. (The page variable has already been declared in the Page Variable tab - with the correct schema)
Then I use a formula in the “set page variable” element shown below.
What this MAP does is iterate though the data variable called “Countries” and creates a new array (CountryObjectArray) using elements from the Country array (accessed using the item. syntax). As you can see, it can even include logic to decide what to include in the new page variable (the “IF” statement).
Hey Adil, I’m afraid that I know nothing about Javascript so I can’t help you other than to say that I’ve noticed that there is a javascript logic element - I assume that runs javascript - so you could try it there!
How is your “Set page variable” module looking like? What is the schema for Page variable? The get collection module will return an array so you might need to use iDate[0] to access the single object returned from your array. Are you assigning the whole record to page variable including id, fields and created date?
When you look in to the “state” tab in Debuger - is the app properly fetching data from Airtable?
unfortunately this topic was not fully answered. I have a similar problem. I am able to connect to Airtable API, get the records, set schema but cannot figure out the logic how to display the data. The Composer Docu says: " After this, it’s simply the matter of adding a data variable for AirtableStories onto a page and making a view component repeat based on the fetched data." But I dont know how to replicate.
I have three fields in airtable and would like to display them in a simple row on an app page. First field should also change colour based on variable value (but this I can figure out myself later).
Are my page variables, data variables properly set?
How to set up variable logic?
How to set up MAP function, if I am supposed to use this function.
A quick walkthrough would help me a lot to understand the concept. Much appreciated!!!