TypeValue error while executing query entity

Hi Team,

Need your help to resolve the problem - 

Problem -  Getting this error while executing the query entity code - Expression evaluation error at function a!queryEntity [line 3]: Cannot apply operator [IN] to field [id] when comparing to value [TypedValue[it=3,v=1; 2]].

Query Entity code -

a!localVariables(
local!panelId:"1; 2",
a!queryEntity(
entity:cons!IM_INTERVIEW_PANEL_DSE_POINTER,
query: a!query(
selection: a!querySelection(
columns: {
a!queryColumn(
field: "name"
)
}
),
filter: a!queryFilter(
field:"id",
operator:"in",
value: local!panelId
),
paginginfo: a!pagingInfo(
startIndex: 1,
batchSize: -1
)
)
).data.name
)

  Discussion posts and replies are publicly visible

Parents
  • Hi, your local!panelId variable is currently defined as text, it appears you would like to define it as a list of integer such as {1,2}.  Try this code instead:

    a!localVariables(
      local!pandelId: {1,2},
      a!queryEntity(
        entity:cons!IM_INTERVIEW_PANEL_DSE_POINTER,
        query: a!query(
          selection: a!querySelection(
            columns: {
              a!queryColumn(
                field: "name"
              )
            }
          ),
          filter: a!queryFilter(
            field:"id",
            operator:"in",
            value: local!panelId
          ),
          paginginfo: a!pagingInfo(
            startIndex: 1,
            batchSize: -1
          )
        )
      ).data.name
    )

    Also, when posting code in the forum here, please take advantage of the "Insert -> Code" feature for readability.  Otherwise, please let us know if the above resolves your issue.

Reply
  • Hi, your local!panelId variable is currently defined as text, it appears you would like to define it as a list of integer such as {1,2}.  Try this code instead:

    a!localVariables(
      local!pandelId: {1,2},
      a!queryEntity(
        entity:cons!IM_INTERVIEW_PANEL_DSE_POINTER,
        query: a!query(
          selection: a!querySelection(
            columns: {
              a!queryColumn(
                field: "name"
              )
            }
          ),
          filter: a!queryFilter(
            field:"id",
            operator:"in",
            value: local!panelId
          ),
          paginginfo: a!pagingInfo(
            startIndex: 1,
            batchSize: -1
          )
        )
      ).data.name
    )

    Also, when posting code in the forum here, please take advantage of the "Insert -> Code" feature for readability.  Otherwise, please let us know if the above resolves your issue.

Children
No Data