Skip to main content
Known Participant
Feb 7, 2022 1:14 PM UTC
Question

query entity not retrieving data correctly

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
Brainy
Feb 7, 2022 1:16 PM UTC

Hi there,

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

Known Participant
Feb 7, 2022 1:20 PM UTC

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
Employee
Feb 7, 2022 2:33 PM UTC

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?