Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
8 replies
Subscribers
4 subscribers
Views
9044 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Reports
Queryfilter parameters
Richard
over 7 years ago
Given the following:
a!checkBoxField(label: "whatever",choiceLabels: {"banana","apple","strawberry"}, choiceValues: {"banana","apple","strawberry"}, value: split(local!choice,";"),saveInto(local!choice,joinarray(save!value,";")))
can I ....
a!query(
blah
blah
...
filters: { a!queryFilter(field: "fruits", operator: "includes", value: split(local!choice,";"))}
)
or would this work?
a!query(
blah
...
blah
....
filters: {
apply(
a!queryFilter(
field: "fruits",
operator: "includes",
value: _
), split(local!choice,";")
)
}
)
OriginalPostID-272206
Discussion posts and replies are publicly visible
0
Richard
over 7 years ago
Sorry for the necessary decoding, imagine local!choice= "apple;strawberry" after the saveInto
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jamalc8231
over 7 years ago
You can use:
filters: {
a!queryFilter(
field: "fruits",
operator: "in",
value: touniformstring(local!choice)
)
)
}
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Richard
over 7 years ago
which would work for apple;strawberry, but not for banana; strawberry, no?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Richard
over 7 years ago
Ah, re-read the documentation on touniformstring(), but the problem is that the database field "fruit" is a condensed string with a ';' delimiter, so the fact that local!choices isn't an array is less of a problem than the fact that it should probably be treated as separate query filters.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
roopeshr
over 7 years ago
you can use multiple filters inside logical expression. Directly you will be able to apply only one filter at a time.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Richard
over 7 years ago
roopeshr - got it, but that really isn't the question. The question is how to handle the queryfilter component of a array that has been condensed into a string. As a string, individual filter items must be contiguous, or they will not match on any substring filter.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
roopeshr
over 7 years ago
@richard.nolan I am still little confused with the question. Can you try converting it to array and then use a!applycomponents for filters.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Richard
over 7 years ago
That's what I was thinking might be necessary. However with other dependencies, I may be having to write a very complex query. Cheers for the help.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel