Odata: queried data of a forEach loop is stored in a dataset accessible later during output generation
As you probably know, data source queries take its time and OData queries are extremely slow.
To speed up output generation, I want to limit data source access as much as possible:
Often I have to iterate multiple times through the same amount of data by use of a forEach tag.
At present it is the case that I have to query the data source for each forEach loop.
From my point of view it would be an advantage if the queried data of a forEach loop is (optionally) stored in a dataset accessible at different positions in the template during output generation.
(This could be indicated by an additional property of the forEach tag.)
Example:
${varNameOne} = [forEach:] (OdataDatasource:ODataEntity?$filter=x eq y) [:forEach] /ForEachProperty:keepData=true
-> This is a (slow) data source access
-> The records are stored in a dataset with name "varNameOne"
-> Later in the template: again access to that records:
${varNameTwo} = [forEach:] (${varNameOne}?$filter=a ne b) [:forEach]
-> This is a (fast) memory access
That applies not only to a forEach tag, but also to a Query tag, what would just result in a single record dataset.

Hello Reporter,
We have reviewed this idea but declined it for development due to lack of votes. Thank you for your idea and please submit any other suggestions you have to improve our software.
Adam Austin
Product Manager