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
3 replies
Subscribers
8 subscribers
Views
2121 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
I am trying to query a Data Store Entity using a!queryEntity() I am interested t
saileshd
over 9 years ago
I am trying to query a Data Store Entity using a!queryEntity() I am interested to query the entity if one of column from entity matches with the values in a local array.
here is the code:
load(
local!modLocs: index(ri!modulesForReview, "toolLocation",{}),
local!modStdDescNotNorthAmerica: remove(index(ri!modulesForReview, "stdDescription",{}), wherecontains(cons!ICAMS_TOOL_LOCATION_NORTH_AMERICA, touniformstring(local!modLocs))),
local!targetsQueryEntity: a!queryEntity(
entity: cons!ICAMS_TARGET_DATA_STORE_ENTITY,
query: a!query(
filter: a!queryFilter(
field: "productType",
operator: "in",
value: index(local!modStdDescNotNorthAmerica, "productType", {})
),
pagingInfo: a!pagingInfo(1, - 1)
)
),
local!targetsByStdDesc: if(
rule!APN_isEmpty(local!modStdDescNotNorthAmerica), {}, local!targetsQueryEntity),/*use query entity to get target rows where product type is in the li...
OriginalPostID-193021
OriginalPostID-193021
Discussion posts and replies are publicly visible
0
saileshd
over 9 years ago
...st local!modStdDescrNotNorthAmerica */
or(
index(local!targetsByStdDesc, "foreignTradeReviewRequired", {false})
)
)
And the error is:
Expression evaluation error at function a!queryEntity [line 4]: Cannot apply operator [IN] to field [productType] when comparing to value [TypedValue[it=197,v={}]].
I tried using different operators as well, but got same errors
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 9 years ago
@saileshd Would you be able to test the attached code which is slightly modified and do let us know if that resolves your issue?
modified code.txt
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
saileshd
over 9 years ago
Thanks Sikhivahans. it worked
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel