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
13 replies
Subscribers
8 subscribers
Views
4526 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
is it possible to put the below expression in query rule where condition?
ramakg
A Score Level 1
over 9 years ago
is it possible to put the below expression in query rule where condition?
month(EMP_HIRE_DATE) &"-"& year(EMP_HIRE_DATE)=year(now()) & month(now())-1
OriginalPostID-199845
OriginalPostID-199845
Discussion posts and replies are publicly visible
Parents
0
ramakg
A Score Level 1
over 9 years ago
is it possible put the same condition in queryEntity?
sample code is :
a!queryEntity(
entity: cons!EMPLOYEE_ENTITY,
query: a!query(
selection: a!querySelection(
columns: {
a!queryColumn(field: "hiredate"),
a!queryColumn(field: "empid")
}
),
logicalExpression: a!queryLogicalExpression(
operator: "AND",
filters: {
a!queryFilter(
field: "hiredate",
operator: "<",
value: date(year(now()), month(now())-1, day(now()))
),
a!queryFilter(
field: "empid",
operator: "=",
value: ri!empid
)
}
),
pagingInfo: a!pagingInfo(
startIndex: 1,
batchSize: -1
)
)
)
getting the below error message
Expression evaluation error at function a!queryEntity: Cannot apply operator [LESS_THAN] to field [dtCreated] when comparing to value [TypedValue[it=7,v=2016-02-10]].
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
ramakg
A Score Level 1
over 9 years ago
is it possible put the same condition in queryEntity?
sample code is :
a!queryEntity(
entity: cons!EMPLOYEE_ENTITY,
query: a!query(
selection: a!querySelection(
columns: {
a!queryColumn(field: "hiredate"),
a!queryColumn(field: "empid")
}
),
logicalExpression: a!queryLogicalExpression(
operator: "AND",
filters: {
a!queryFilter(
field: "hiredate",
operator: "<",
value: date(year(now()), month(now())-1, day(now()))
),
a!queryFilter(
field: "empid",
operator: "=",
value: ri!empid
)
}
),
pagingInfo: a!pagingInfo(
startIndex: 1,
batchSize: -1
)
)
)
getting the below error message
Expression evaluation error at function a!queryEntity: Cannot apply operator [LESS_THAN] to field [dtCreated] when comparing to value [TypedValue[it=7,v=2016-02-10]].
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data