I’m trying to create a way to comment on a user-made text. My idea is to create an Airtable with two columns, the question where the comment is directed toward, and the comment. How would I search through the rows to extract only the rows based on the question, and how do I add that into the data viewer? Thank you!
you could search a column for the question
when you find the index, that is your row number,
get the cell in column two using the index of the row from column 1
How would i search for the question? And how could I repeat the search to look through the entire list of comments?
I’ve read those but none cover how to convert an airtable into a local storage spreadsheet so i can connect it to list viewer.
Why do you need to put your airtable into the localdb?
Why not work with the data directly? You can absolutely connect to an airtable Base, get all rows/or a single column and pull the information you need via looping so it can be presented in a listviewer
The airtable has two columns, “question” and “comment”. Whenever someone submits a comment, it creates a row with the question and the comment. I then need to send it to localdb so I can filter and remove all of the comments for unrelated questions, and then send the remaining data (comments related to the question) to the data viewer
check this out. This is a generic example I made for your situation
Here is an example I use in my main project
you can see I filter for multiple things and then grab multiple pieces of info from the table. 3 lists are created in total from this query
if this works for you, please mark this as a solution so others can reference this fix
Your code looks correct so I’m assuming its something on my part, but the list viewer comes out blank.
(“comment-question” is just the question the comment is towards, “comment” is the comment)
if you could share a screenshot of your airable, that would be helpful to help troubleshoot.
test this out with this table
the code i sent works with this perfectly. then work your way back to your app and figure out where the issue lies
I’m trying to filter out each comment by the question (comment-question is just the question that was commented on)
Also thanks for helping!
When the screen opens, I already have the question and the answer and their index in a separate table. I’m trying to filter through a second table called “comments” and then create a list view out of the ones based off of the first column in the comments table, which is the question its responding to.
So basically I have a text value (the question) in the separate question table (that i already have)
and the question column in the comments table
Then, Im trying to create a new list with all of the comments from the comment table using the indexes from the comparison
If this didn’t make sense please let me know, it sounds kinda complicated because of all the bad names i chose for variables and such
if you are returning nothing, you are filtering out all of the data?
when you send out for “all rows” does it return anything? then, if it does reutnr all the data, try filtering using a text block where you copy and paste text from your question column in your airtable into the blocks section instead of filtering based on what appears in variable transferred from the other screen.
then if that works, try with the variable again.
somewhere, the process is breaking down. What i posted is how to query desired data. Make sure property(column) names are correct including capitalization.
I put the GetAllRows value (by turning list into text) into a lable and multiple [object, Object] came out,
The data is there but nothing seems to show, probably has something to do with the [object, Object]
try this. only do 'getAllRows" on screen open. include the filtering and populating the listviewer.
just this part
instead of using the variable “stored question”, i’d like you to copy and paste the qeuestion from the airtable itself to ensure you are using the exact wording/letter spacing/ punctuation etc. then do the following stuff
as a note, in the blocks shown above, the listviewer is being populated before the variable has stuff put into it. put the blocks to fill the list viewer here
just after, (not inside) the loop. you need the variable to get filled up with data from the filtering that takes place before you try to fill the list viewer.
This works on the in-browser ios emulator but I’m downloading it to my phone right now to see if it 100% works! I think the “insert list” was the problem
Thank you so much I’ve been working on it for the entire afternoon
Sweet! I hope it helps! Reach back out and let me know!
It works! One minor problem but I can look at it later in development as it isn’t vital to the backend