From a multiselect field in AppGyver, User A chooses “red”, “blue”, “green”, “purple”. I want to pull all records from my Cloth table which have those 4 colours
From a multiselect field in AppGyver, User B chooses “pink”. I want to pull all records from my Cloth table which have pink.
I do not know in advance how many criteria the user will select.
I know i can sort by multiple fields using an array → ?sort[field]=day&sort[direction]=asc&sort[field]=name&sort[direction]=desc (of course the whole query parameter needs to be encoded)
But i don’t know how to do that for filters through API cause API filtering is done through filterByFormula → and if i were to use an OR function, i need to know how much filters there are in advance e.g. user will choose 1 colour, or 2 colours, or 3 colours etc
Could someone kindly teach me how I can get this done in AppGyver linking to Airtable? Thanks!
Correct - this is what’s known as a late-binding operation; you must generate the API query for each condition presented by each user. Typically this is done by constructing the query string dynamically for each user’s request and then using the Airtable API to make the query.
Ergo, given an array of colors, build a query string to satisfy the API call using filterByFormula.
hi Bill! thanks for your help once again, i took quite long to respond as i wanted to do sufficient research and have a proper reply :slightly_smiling_face:
late-binding operations - this sounds very interesting
Question 1) how do i generate the query string dynamically?
Question 3) can i use cURL to generate the query string?
P.S. i’ve been reading a few other posts you made on a few other topics and will add on to them soon once i further streamline my contribution! :slightly_smiling_face: