"The a!queryFilter function has an invalid value for the “value” parameter. When the value of “operator” is “=” “value” must not be null or empty." I'm getting this expression evaluation error.

"The a!queryFilter function has an invalid value for the “value” parameter. When the value of “operator” is “=” “value” must not be null or empty." I'm getting this expression evaluation error.

with(

 local!pagingInfo: a!pagingInfo(

   startIndex: 1,

   batchSize: - 1

 ),

 a!queryEntity(

   entity: cons!CFS_ALL_DS[7],

   query: a!query(

     filter: a!queryFilter(

       field: "Id",

       operator: "=",

       value: ri!Id

     ),

     pagingInfo: local!pagingInfo

   )

 )

)

  Discussion posts and replies are publicly visible

Parents
  • HI shobhits,

    Please make sure when applying a filter to a field in the query filter, a field value shouldn't null, try like as below:

    if(
    rule!APN_isEmpty(ri!id),
    {},
    a!queryFilter(
    field: "Id",
    operator: "=",
    value: ri!Id
    )
    )

    Thanks,
    Vijay
  • 0
    Certified Lead Developer
    in reply to vijay
    Something you need to consider when taking this approach, though, is that leaving out the filter when ri!Id is blank, will generally result in all rows of that database table being returned as the query result, instead of nothing as you might expect. Depending on the intended usage of the QE rule, that can be either addressed in the QE rule itself (i.e. passing an impossible value to the "value:" parameter if the input is null, like -1), or handling it in the place the rule is called.
Reply
  • 0
    Certified Lead Developer
    in reply to vijay
    Something you need to consider when taking this approach, though, is that leaving out the filter when ri!Id is blank, will generally result in all rows of that database table being returned as the query result, instead of nothing as you might expect. Depending on the intended usage of the QE rule, that can be either addressed in the QE rule itself (i.e. passing an impossible value to the "value:" parameter if the input is null, like -1), or handling it in the place the rule is called.
Children