DataLab secondary queries
DataLab has the ability to chain two queries so you can perform a secondary query against each found Entity in the primary one.
This effectively gives you for-loop like functionality to further isolate the specific records you want to work with.
Basics
The documentation for secondary queries matches the primary documentation. So we'll cover how to reference the primary query and what actions will be supported.
When specifying a criterion you can assign a .ValueOption property to equal "PRIMARY" as a way to indicate that the Operand should be referenced from the primary query.
Here is how you can find Entities near other Entities as an example. Note that this doesn't return the found result as it's two dimensional, instead it lets you perform an action against the result.
You can get a sample of the result against a specific Entity by specifying these properties.
Action: Set attribute value
You can set a value on each found Entity in the secondary selection through the set-attribute action.
This will let you reference the relevant primary Entity for the value if you want to use that over a fixed value.
Action: Merge Entities
This action will merge each secondary Entity into the corresponding primary Entity. The secondary Entities are not deleted. Specify the mapping below to dictate the merge logic.