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
9 replies
Subscribers
10 subscribers
Views
4169 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Data and Records
Hi, How to implement multiple facets on service-backed records. For e
Durgesh
A Score Level 2
over 11 years ago
Hi,
How to implement multiple facets on service-backed records. For example, I have defined two facets, one for Title & another for Department. What will be the structure of filter query in this case (Having both the facet options selected by a user)?
Please provide any example.
Thanks...
OriginalPostID-99458
OriginalPostID-99458
Discussion posts and replies are publicly visible
Parents
0
Durgesh
A Score Level 2
over 11 years ago
My rule is -
=with(
filterValue: if(
isnull(ri!query.'logicalExpression|filter|search'),
"",
ri!query.'logicalExpression|filter|search'.value
),
usersList:
if(isnull(filterValue),
rule!ViewUsers(),
apply(rule!getOddIndexValues,rule!ViewFilteredUsers(filterValue))
),
'type!{
www.appian.com/.../2009}ListView'(
dataSubset: 'type!{
www.appian.com/.../2009}ListViewDataSubset'(
startIndex: 1,
batchSize: count(local!usersList),
totalCount: count(local!usersList),
data: apply(
rule!getUserItem,local!usersList
),
identifiers: apply(
rule!getUserIdentifier,local!usersList
)
),
facets: {
'type!{
www.appian.com/.../2009}Facet'(
name:"Department",
options:{
'type!{
www.appian.com/.../2009}FacetOption'(
id:1,
name:"CXO",
filter:'type!{
www.appian.com/.../2009}QueryFilter'(
field:"groupId",
operator:"=",
value:"1"
)
),
'type!{
www.appian.com/.../2009}FacetOption'(
id:2,
name:"BU",
filter:'type!{
www.appian.com/.../2009}QueryFilter'(
field:"groupId",
operator:"=",
value:"2"
)
),
'type!{
www.appian.com/.../2009}FacetOption'(
id:3,
name:"Finance",
filter:'type!{
www.appian.com/.../2009}QueryFilter'(
field:"groupId",
operator:"=",
value:"3"
)
),
'type!{
www.appian.com/.../2009}FacetOption'(
id:4,
name:"Human Resources",
filter:'type!{
www.appian.com/.../2009}QueryFilter'(
field:"groupId",
operator:"=",
value:"4"
)
),
'type!{
www.appian.com/.../2009}FacetOption'(
id:5,
name:"Information Technology",
filter:'type!{
www.appian.com/.../2009}QueryFilter'(
field:"groupId",
operator:"=",
value:"5"
)
)
}
),
'type!{
www.appian.com/.../2009}Facet'(
name:"Title",
options:{
'type!{
www.appian.com/.../2009}FacetOption'(
id:1,
name:"President",
filter:'type!{
www.appian.com/.../2009}QueryFilter'(
field:"titleId",
operator:"=",
value:"1"
)
),
'type!{
www.appian.com/.../2009}FacetOption'(
id:2,
name:"Vice President",
filter:'type!{
www.appian.com/.../2009}QueryFilter'(
field:"titleId",
operator:"=",
value:"2"
)
),
'type!{
www.appian.com/.../2009}FacetOption'(
id:3,
name:"Sr. Manager",
filter:'type!{
www.appian.com/.../2009}QueryFilter'(
field:"titleId",
operator:"=",
value:"3"
)
),
'type!{
www.appian.com/.../2009}FacetOption'(
id:4,
name:"Manager",
filter:'type!{
www.appian.com/.../2009}QueryFilter'(
field:"titleId",
operator:"=",
value:"4"
)
),
'type!{
www.appian.com/.../2009}FacetOption'(
id:5,
name:"Associate",
filter:'type!{
www.appian.com/.../2009}QueryFilter'(
field:"titleId",
operator:"=",
value:"5"
)
)
}
)
}
)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Durgesh
A Score Level 2
over 11 years ago
My rule is -
=with(
filterValue: if(
isnull(ri!query.'logicalExpression|filter|search'),
"",
ri!query.'logicalExpression|filter|search'.value
),
usersList:
if(isnull(filterValue),
rule!ViewUsers(),
apply(rule!getOddIndexValues,rule!ViewFilteredUsers(filterValue))
),
'type!{
www.appian.com/.../2009}ListView'(
dataSubset: 'type!{
www.appian.com/.../2009}ListViewDataSubset'(
startIndex: 1,
batchSize: count(local!usersList),
totalCount: count(local!usersList),
data: apply(
rule!getUserItem,local!usersList
),
identifiers: apply(
rule!getUserIdentifier,local!usersList
)
),
facets: {
'type!{
www.appian.com/.../2009}Facet'(
name:"Department",
options:{
'type!{
www.appian.com/.../2009}FacetOption'(
id:1,
name:"CXO",
filter:'type!{
www.appian.com/.../2009}QueryFilter'(
field:"groupId",
operator:"=",
value:"1"
)
),
'type!{
www.appian.com/.../2009}FacetOption'(
id:2,
name:"BU",
filter:'type!{
www.appian.com/.../2009}QueryFilter'(
field:"groupId",
operator:"=",
value:"2"
)
),
'type!{
www.appian.com/.../2009}FacetOption'(
id:3,
name:"Finance",
filter:'type!{
www.appian.com/.../2009}QueryFilter'(
field:"groupId",
operator:"=",
value:"3"
)
),
'type!{
www.appian.com/.../2009}FacetOption'(
id:4,
name:"Human Resources",
filter:'type!{
www.appian.com/.../2009}QueryFilter'(
field:"groupId",
operator:"=",
value:"4"
)
),
'type!{
www.appian.com/.../2009}FacetOption'(
id:5,
name:"Information Technology",
filter:'type!{
www.appian.com/.../2009}QueryFilter'(
field:"groupId",
operator:"=",
value:"5"
)
)
}
),
'type!{
www.appian.com/.../2009}Facet'(
name:"Title",
options:{
'type!{
www.appian.com/.../2009}FacetOption'(
id:1,
name:"President",
filter:'type!{
www.appian.com/.../2009}QueryFilter'(
field:"titleId",
operator:"=",
value:"1"
)
),
'type!{
www.appian.com/.../2009}FacetOption'(
id:2,
name:"Vice President",
filter:'type!{
www.appian.com/.../2009}QueryFilter'(
field:"titleId",
operator:"=",
value:"2"
)
),
'type!{
www.appian.com/.../2009}FacetOption'(
id:3,
name:"Sr. Manager",
filter:'type!{
www.appian.com/.../2009}QueryFilter'(
field:"titleId",
operator:"=",
value:"3"
)
),
'type!{
www.appian.com/.../2009}FacetOption'(
id:4,
name:"Manager",
filter:'type!{
www.appian.com/.../2009}QueryFilter'(
field:"titleId",
operator:"=",
value:"4"
)
),
'type!{
www.appian.com/.../2009}FacetOption'(
id:5,
name:"Associate",
filter:'type!{
www.appian.com/.../2009}QueryFilter'(
field:"titleId",
operator:"=",
value:"5"
)
)
}
)
}
)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data