Skip to main content
February 7, 2022
Question

query entity not retrieving data correctly

  • February 7, 2022
  • 3 replies
  • 1 view

Hi Team,

QueryEntity is not fetching data correctly, below is my code:

a!queryEntity(
entity: cons!TEMP_TABLE,
fetchTotalCount: ri!fetchTotalCount,
query: {
a!query(
selection: if(
rule!APN_isEmpty(ri!columns),
{},
a!querySelection(
columns: a!forEach(
ri!columns,
a!queryColumn(field: fv!item)
)
)
),
logicalExpression: a!queryLogicalExpression(
operator: "AND",
filters: {
a!queryFilter(
field: "clientId",
operator: "=",
value: ri!clientId
),
a!queryFilter(
field: "requestorName",
operator: "=",
value: ri!requestorName
),
a!queryFilter(
field: "engagementNumber",
operator: "in",
value: ri!engagementNumber
),
},
ignoreFiltersWithEmptyValues: true()
),
paginginfo: if(
rule!APN_isEmpty(ri!pagingInfo),
a!pagingInfo(startIndex: 1, batchSize: - 1),
ri!pagingInfo
)
)
}
).data

In the test output, it is returning the result as infinity symbol for a particular column which is number(integer), shown below:


My table in the backend holds a valid value for the particular column, but somehow the queryentity is unable to fetch it properly.

Any suggestions to fetch the correct value please?

Thanks.

3 replies

harshitb6843
February 7, 2022

Hi there,

Those values might be out of the integer's range. What are the valid values in your table? 

February 7, 2022

Hi,

So the column is a integer type having the range as INT(11). And the particluar value for which it is unable to retrieve properly is 2147483647.

peter.lewis
Participating Frequently
February 7, 2022

Yep, see the documentation on Appian data types - that number is too large: docs.appian.com/.../Appian_Data_Types.html

How do you need to use the data? Can you store it as a decimal or a text instead?