Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Suggested Answer
+1
person also asked this
people also asked this
Replies
8 replies
Answers
1 answer
Subscribers
12 subscribers
Views
7086 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Data and Records
If a user enters a search value and selects filters in a service-backed record,
Carlos Santander
A Score Level 2
over 8 years ago
If a user enters a search value and selects filters in a service-backed record, is the search value guaranteed to always be the last item in the logical expression passed to the expression?
OriginalPostID-202075
OriginalPostID-202075
Discussion posts and replies are publicly visible
0
tharshulas
over 8 years ago
No Carloss, It doesn't guarantee that you will always have the search value. You can use rsp!query (Query data type) in Expression context of Record Type.
Then refer the searchKey inside your logical expression as follows:
with(
local!queryCondition: index(
ri!query,
"logicalExpression|filter|search",
null
),
local!searchKey: index(
local!queryCondition,
"searchQuery",
null
)
)
And also refer following url for more details:
forum.appian.com/.../Service-Backed_Record_Tutorial.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
+1
PhilB
Certified Lead Developer
over 8 years ago
Attached is a snippet which shows what the rsp!query object looks like when a search term has been entered and two filters have been selected. You can also use this snippet to test any expression that requires an ri! in the form of the rsp!query object.
rspquery.txt
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Reject Answer
Cancel
0
Carlos Santander
A Score Level 2
over 8 years ago
Thanks both. I already have an implementation that can take the data from rsp!query and use it in a!queryEntity, but it currently relies on the type!Search object being the last element (after all the type!QueryFilters), as that's what I've seen in my own testing. That's why I wanted to know if that's guaranteed.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
Certified Lead Developer
over 8 years ago
Not sure why you'd need to rely on it being the last object? The parseRspQuery rule in the tutorial link above will get it if it exists - once you've got it into a local you can handle it first or last regardless of the order...?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Carlos Santander
A Score Level 2
over 8 years ago
It's called "not looking for the most recent documentation" :) Thanks again.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
Certified Lead Developer
over 8 years ago
No problem! :)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
Certified Lead Developer
over 8 years ago
I should add - that service backed record tutorial is excellent, and sets out a very nice pattern for the creation of service backed records and addition of filters, search etc.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jims419
Certified Lead Developer
over 6 years ago
in reply to
PhilB
Hey Phil, do you happen to have an idea of what rsp!query looks like when a multi select filter is chosen?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel