I have an Airtable REST API GET of single record, which I parse the fields in the Data Resource. This Data Resource is loaded into a data variable with the default method. Various items of this data variable are displayed in a Details page. However, the iOS preview app does not show the data while the Web Portal Preview app does show the data. Can you please help? I tried various ways to configure the data resource and data variable, but did not succeed. I believe it could be a bug.
The page is AppGyver - Composer Pro
Hi @Michael_Ho, thanks for reaching out! Do you get any info in the debugger about a possible error when you load the app on mobile preview?
Hi, I did check the debugger. There were no errors flagged when I ran the Preview App on my iOS mobile. The debugger shows that the App was able to load the record from the REST API and put it into the data variable. And the page also mounted. So, I am not sure why the page is not able to show the data from the record on iOS Preview App when it works on the Web Preview App. Please let me know if there was something I did not do correctly.
Okay, good to know that it at least loads – I wonder if it could be some kind of incompatibility issue, could you post a screenshot of your data variable in the debugger and the schema of the data variable in Composer to check if they match?
Hi, please find the screen captures below
Hope you are able to see a way to solve this problem.
FYI, the 2nd screen capture is the data assignment flow function, where I assign the output of the Get Record from Airtable single record to the data variable. I select the only compatible node, which is the Record node. Thanks, Michael
If you drop a paragraph component on the canvas and set its value with a formula to
ENCODE_JSON(data.yourVariable) does the data show up?
Could I get your app ID (number sequence from Composer URL) and the page where you have the repeat so I can forward this to the development team for further investigation?
Yes, so if I put a paragraph component on the canvas and set its value to the formula:
where data.airtableStocksDBAll1 is the data variable,
Then the value of dscd does show up with quotes around it (e.g. “12345”)
Okay, very strange – I noticed you already provided the app info in the first message, will forward that to the team.
Ok. I also verified that ENCODE_JSON(data.airtableStocksDBAll1) also works and returns a JSON object
By the way, the JSON record returned from Airtable is quite large, perhaps it is disrupting the parsing of the fields?
It might be, how long of a list are you trying to render? If you have a ton of items, using the Recycler view component from the marketplace around the repeat could be worth a try, since it only renders the items that are currently visible and some ahead
Edit: noticed it’s not a list but an item, what kind of components do you have on your Detail page?
Hi currently, there are only paragraph components in containers that are mapped to each data item such as airtableStocksDBAll1.dscd.
I tried using a Recycler View component to house these containers of paragraphs with data items. It does not show any data. In fact, if I put the paragraph with ENCODE_JSON formula defined before, it also blocks the view of this paragraph.
So Recycler View does not help it seems.
Hi, yeah Recycler view is intended for cases with a repeating list of items. Is there any effect if you change the direct variable bindings of the paragraphs to a formula binding instead? Could you share a screenshot of how you are doing the bindings?
As planned, the final page should have both paragraph components show the data in fields and also 4-6 chart components that plot the data contained in some of the fields. I have not gotten around to adding the chart components yet.
Hi, I deleted the Recycler View. I then did the formula referencing of Paragraph content like this: data.airtableStocksDBAll1.dscd for all fields. It did not help as it still does not show any data.
However, I just noticed that the paragraph with ENCODE_JSON(…) formula is not longer showing any data. This is quite frustrating…
I changed the formula referencing back to direct referencing to the data variable. The ENCODE_JSON is still not showing any data for some reason…
I checked the Web Preview App, which still shows all the data, as before…
Okay, thanks for letting me know! We’ll have someone take a look at the app to see what’s causing this behavior