Tried passing multiple values to a query param to filter a column values that are in the list of values in query param.
In Query Filter tried the "in" operator. Its not working. Below is sample query param with multiple filters to filter by that I am trying.
?queryParam=value1,value2
Please advise how to filter based on multiple values.
Discussion posts and replies are publicly visible
We need more context here. Is this about one of these cases:
- a queryFilter for queryRecordType
- about a third party API that you want to pass values to
- or about an API that you create and you want to get values passed?
And try to explain this like to a three year old.
we have 2 Appian application and get value though web api call. One application require, all records from other application by passing multiple Ids as query parameter.
passing multiple value is not working, for single ids working fine.
I feel like a 120 years old caveman !?!?!?
I try to translate this into something usable.
- I want to create a GET API in Appian that accepts multiple comma-separated IDs in a single query parameter
- I need to query a list of records for which the primary key matches the passed IDs
- I then want to return the fetched record data in JSON format
Is that correct? If no, please elaborate.
And I need to see your implementation!
yes, that's correct
?deliveryId=%7B3%2C2%7D
Do you think that I can help you without seeng what that query expression is doing !?!?
So you pass a string like "{1,2,3}" into a queryFilter using the "in" operator. What data type is that rule input?
I suggest to parse the string into a list of integers before passing it into the query.
a!localVariables( local!input: "{1,2,3}", tointeger(split(extract(local!input, "{", "}"), ",")) )
Thanks a Lot its working