Code_Guru
(Code Guru)
October 31, 2021, 10:49am
#1
Hi there, I’ve trying to fetch data from an airtable into a spreadsheet and then set elements of multiple listviews to the different columns fetched.
The code is able to fetch the first two columns but failing to do so for the rest…
Can anyone spot if there is an error in my code…?
dora_paz
(Dora)
October 31, 2021, 10:51am
#2
Make sure that you typed correctly columns names. Post a screenshot of your airtable database
Switch to dictionary method, and it will work without problem . Just try
That kind of error is obtained when you try to get data from a Json and the logic you use to extract the data does not match with the structure of the json
Here is an example of how you can get data from Airtable using the GetAllRows block (with this block you get a Json in the response content) using dictionaries
Note: In airtable it is easier to get each column and then work with those data as lists
This is my Airtable structure:
[imagen]
We create the variables for each airtable column.…
dora_paz
(Dora)
October 31, 2021, 10:59am
#4
Also I noticed that you use 5 different listviews, maybe not shown because of your desing. Use Do it to debug you blocks and see if global variables are getting data from airtable or not
Yes, this is not the correct way to show elements in list view…
Instead of list view events block, use add items to the list block and add all those items for each number into 5 lists ,then use one click to timer with just 1sec, after the clock timer just use the variable to show the list in each list view
Code_Guru
(Code Guru)
October 31, 2021, 12:27pm
#6
I literally have copy-pasted column names from airtable, so that isn’t the case…
I hope your method is wrong . You can use directly rank elements to get rank variable and so on
1 Like
Code_Guru
(Code Guru)
October 31, 2021, 12:57pm
#8
I tried what you’re suggesting. And I’ve made this post after digging through other related posts.
As I stated, the code is able to fetch the first two columns successfully, but not the rest…
In such case, Have you tried the dictionary method, suggested in the third post??
dora_paz
(Dora)
October 31, 2021, 2:30pm
#10
As I said use Do it and see if really you are not getting data from airtable
Code_Guru
(Code Guru)
November 1, 2021, 12:49pm
#11
@ Still-learning GSR I don’t know how, but this correction helped me resolved the issue.
I changed my code several times, that’s why I coudn’t figure out where the problem persisted.
1 Like
system
(system)
Closed
December 1, 2021, 12:49pm
#12
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.