I am trying to query a Data Store Entity using a!queryEntity() I am interested t

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

Parents
  • ...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
Reply
  • ...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
Children
No Data