Get all records query with multiple search terms

Options
I have a table with a text field with comma separated values.  I want to GET ALL RECORDS from that table based on values submitting by a user.  User input is JSON with 1 to 10(?) text values.  Presently those values live in an array.  I'm having trouble working with the conditional statement(s) in the table query.

The user input array "searchlist' might be ["A","B","C"] and I want to search the table to find records where record"20" parameters field might be "C,F,G" and record"30" parameters might be "A,F" and record"35" parameters "D,E,T".  Results are records "20" and "30".

This is an OR conditional where the search is for "A" OR "B" OR "C".

Michael notes using variables for greater flexibility in his "Query All Records" video and mentions the OR() operator which is fine.  However on the right side of the conditional statement where the "searchlist" is an array, as I am using, I'm not finding documentation where the filter variable is an array of values thereby isolating the items: searchlist[0] OR searchlist[1] OR searchlist[2]: "A" OR "B" OR "C".  

Maybe there is an elegant way to do this but I haven't found it in the documentation.  Creating separate variables for each item in the array appears clumsy. Setting the right side of the conditional to "searchlist[0]" results in "null" since it is interpreted as text and not an index.  Dot notation did not work either.  

I haven't found the right filter to use on the searchlist array but it probably exists, just need some guidance locating it.

Comments

  • Kevin Wasie
    Kevin Wasie Member
    Options
     Is this what you are looking for?

    There is the Array [] Find All function that does a lot of the heavy lifting.