I am trying to use the a!queryEntity function to query my database using an expression rule. When I test the rule out, even though the query should return 2 values, it only returns 1. It does return an array of my CDT, but it only returns the first value for some reason. I have attached my code below. Any suggestions?
Output (shows one value but should have 2 values):
Discussion posts and replies are publicly visible
Your pagingInfo's batchSize will limit the number of query results to that number (in your case, 1), regardless of how many entries are in the database. To query all, pass in a batchSize of -1.
(Another trick that's useful in some cases is passing in a batchSize of 0, which returns no rows but returns the totalCount.)
The newer version of Query Entity does have a parameter to fetch total count
True, but that doesn't really have anything to do with what I was talking about re: passing a batchSize of 0 (though it's true that "fetchTotalCount" would need to be set to TRUE for this to work in versions ~18.4 and up).