Hi,
I have created a view to display it in read only grid.
There is huge amount of data that needs to be retrieved and displayed.
But when am writing simple query to fetch data am getting error:
a!queryEntity( entity: cons!AB_DE_V_DD, query: a!query(
pagingInfo: if( rule!APN_isEmpty( ri!pagingInfo ), a!pagingInfo( startIndex: 1, batchSize: 50 ), ri!pagingInfo ) ) )
Error: Expression evaluation error at function a!queryEntity: An error occurred while retrieving the data.
Can someone help to sort this issue.
Note: When am using filter to retrieve data, am not getting any error
Discussion posts and replies are publicly visible
You need to examine the Appian logs to find out the exact root cause of the error. Look in the current stdOut log. Given that you've already said the dataset is huge it may be volume-related, but check the logs to be sure, there are other reasons why this error occurs.
Thanks seems so many date field are used so that issue..
Can you help me with like how to retrieve data from db for last 10 days
Your Query Entity can include a queryFilter() where you can compare a date that is in your data with today()-10, for example.
Thanks but still using date filter am getting
Error as Expression evaluation error at function a!queryEntity: An error occurred while retrieving the data.
But using filters on other fields am able to retrieve data
a!queryFilter( field: "recordedon", operator: "in", value: index(ri!recordedon > = {today()- 10},"recordedon",{}) ),
Is there any other logic that can be used to get data for last 10 days. If so please provide the code
Anyway thanks for help made changes from database side to retrieve data for 10 days.
You could also add a 'selection' to your query to only retrieve data from the columns you need, rather than retrieve everything (which is the default). This is a good principle - only retrieve the data you need in the context you need it. You can also constrain the number of rows retrieved, which it looks like you are, by setting the batchSize to a value other than -1 (which is 'everything').