Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
15 replies
Subscribers
9 subscribers
Views
11458 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Expression evaluation error at function a!queryEntity [line 6]: An error occurred while retrieving the data.
ajinkyab277
Certified Lead Developer
over 8 years ago
I am receiving below error when I try to execute the query entity rule qith below code
------------------------------
load(
local!pagingInfo: a!pagingInfo(
startIndex: 1,
batchSize: 20
),
a!queryEntity(
entity: cons!MERCP_DSE_TEST_DS,
query: a!query(
pagingInfo: local!pagingInfo
)
).data
)
--------------------------
However same code works when i just insert query selection in above code
load(
local!pagingInfo: a!pagingInfo(
startIndex: 1,
batchSize: 20
),
a!queryEntity(
entity: cons!MERCP_DSE_TEST_DS,
query: a!query(
selection: a!querySelection(
columns: {
a!queryColumn(
field: "CreateUser"
)
}
),
pagingInfo: local!pagingInfo
)
).data
)
----------------------
No error in a...
OriginalPostID-261209
Discussion posts and replies are publicly visible
0
ajinkyab277
Certified Lead Developer
over 8 years ago
...pplication_server.log and server.log
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
melwynabrahamj
over 8 years ago
I believe query rule can fetch data up to 10MB...If same applies to query entity, that could be an issue...(Just a guess)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Dastagiri Dudekula
over 8 years ago
The above given code fragments both are resulting with results without any error. Look at the attached screens. The reason may be fundamental issue i.e., query entity is meant for specific field selection from the entity. So, that might be causing the functional glitch
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ajinkyab277
Certified Lead Developer
over 8 years ago
@melwynabrahamj: If I execute the same thing with query rule instead of Query entity it works fine. There are total 157 rows in that table. However, i am also giving passing paging info
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Dastagiri Dudekula
over 8 years ago
Suggested way to keep in mind is that every query entity must have the all or required rule inputs and they must be selected with proper null handling in the query.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Sally Mason
Appian Employee
over 8 years ago
For data to be returned, you need a query parameter. Perhaps you are thinking that the first query should return everything? Usually you would set some kind of condition, like in your second example to return data.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Dastagiri Dudekula
over 8 years ago
Further to be considered, timeout of the query and memory limit settings.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ajinkyab277
Certified Lead Developer
over 8 years ago
@Sally: I have also added filter condition which should return only one row. But this time also same error. I am expecting my query rule to return all the columns from the database.
-----------------------------
load(
local!pagingInfo: a!pagingInfo(
startIndex: 1,
batchSize: 20
),
a!queryEntity(
entity: cons!MERCP_DSE_TEST_DS,
query: a!query(
filter: a!queryFilter(
field: "ActivityTypeId",
operator: "=",
value: 127
),
pagingInfo: local!pagingInfo
)
).data
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ajinkyab277
Certified Lead Developer
over 8 years ago
@Dastagiri: I have not received any error related to time out in logs
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Dastagiri Dudekula
over 8 years ago
@Ajinkya Then there is a malfunction in queryEntity() because as I have already attached the test code snippet screens, your code fragments(with entity chage) are executing fine on my work area.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>