I have three entities in which entity 1 and 2 use a reference selector to choose an input (Name) from entity 3. In entity 1, users also must indicate a score (type float). In entity 2 I want to give an average of this score, but only for the situations in which the 'Name' for entity 1 and 2 is the same. How do I manage to retrieve the right scores? Retrieving in a list where I set the XPath constraint (via the associations) that both the Names must be equal seems not to work. This also leads me to the question, where are the values stored from a reference selector; how can I retrieve them easily in a microflow? Thanks, Mark
You shouldn't use names (since there can be duplicates / misspellings), instead use the reference to the object (the reference is a GUID). The reference is stored in your object and you can check if the references point to the same object.
If your microflow has no input objects:
Retrieve all objects of Entity3
Loop over all objects of Entity3
For an object of Entity 3, retrieve a list of objects of Entity2
Loop over all objects of Entity2
Retrieve all objects of Entity1 where [Entity1_Entity3 = $IteratorEntity2/Entity2_Entity3]
Use a ListOperation Average on Entity1/Score
Store AverageScore in Entity2
If your microflow has an input object of Entity2, you can skip steps 1. through 4.