I am trying to construct a Web API that queries a data entity and compares a fie

Certified Senior Developer
I am trying to construct a Web API that queries a data entity and compares a field in that data entity with an array of values that I've stored in a local variable (created from another a!queryEntity). I've hardcoded the value in my first query so I know what results I should get in the second one. Both queries work individually, but I get this expression evaluation error when I combine them. Any suggestions on what I'm missing? I'm pretty sure that once I get this working, I'll also have to add something to account for null values in the first query....but that's another issue. See the attached file for the code.

Expression evaluation error at function a!queryEntity [line 33]: Cannot apply operator [IN] to field [checkid] when comparing to value [TypedValue[it=197,v={TypedValue[it=1,v=621],TypedValue[it=1,v=622],TypedValue[it=1,v=623]}]].

NestedQueryForWebAPI.txt

OriginalPostID-200061

OriginalPostID-200061

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer
    Thanks @sikhivanhans - I didn't get an error this time, but it brought back ALL the records in the second data entity (cons!ABC_AMOUNT_DS). If I hard-code the value in the first query - the results I get in the second one are correct. I think I'm on track now...I just need to figure out why the 2nd query brought back ALL the data. It should have brought back no data.
Reply
  • 0
    Certified Senior Developer
    Thanks @sikhivanhans - I didn't get an error this time, but it brought back ALL the records in the second data entity (cons!ABC_AMOUNT_DS). If I hard-code the value in the first query - the results I get in the second one are correct. I think I'm on track now...I just need to figure out why the 2nd query brought back ALL the data. It should have brought back no data.
Children
No Data