Get all records query with multiple search terms
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.
Other
1 reply