Retrieving eigenvalues excluding duplicate values

We ask for your help because it is still difficult to configure Microflow as a novice user.   We are trying to limit the data of one attribute in a specific entity to a unique value excluding duplicate values so that it can be loaded to Page and selected as DropBox.   Can I know an example of a microflow configuration that limits to eigenvalues?
1 answers

I think there might be something wrong with your domain design when there are more than 1 records with (let’s say) attribute A containing the value X, then creating a distinct list of records will associate the record via the dropbox to one of those records and never the other. But you might be using this differently, so here is a solution:

On the dropbox make sure to set the data source as microflow. In the microflow perform the retrieve followed by a creatlist activity that holds the same objects. The add a loop which loops over the retrieved list. In the loop add a list operation activity that performs a find on the second list matching the attribute. If this yields a result there is already an object in the list with the value for that attribute so this does not need to be added to the list. This can be decisded with a decision activity that check the result of the find operation. If nothing is retrieve then add the iterator to the list. After this loop you have all the objects in the list with the unique value for attribute A and in the end activity you make sure to return this list.

Another more advanced option can be achieved by using the OQL module and perform a distinct query directly, far better for perfomance certainly if the retrieved list is large. See OQL module in the marketplace.