Filter list for unique values

Hi all, I would like to populate a data grid with a microflow. Here is the setup: There is an entity "WarehouseTransaction". One attribute of the transaction is "Location". There are several transactions/records with the same location. I would like to create a list where each location is included only once. In other words: I would like to remove all "duplicate locations". I have tried the list operation "union", but could not make it work. Any suggestions are welcome
5 answers

Union means that it will combine two lists. Not exactly what you want. . There is no list operation for this as far as I know

  1. Create a new list: warehousetransactionsUniqueLocations
  2. Loop thru the warehousetransactions
  3. in the loop: add a list operation 'find' equals IteratorWarehouseTranaction/Location
  4. If not found: add to the warehousetransactionsUniqueLocations list.

This sounds like a situation where data normalization would help you. You should create a Location entity to store your location, then associate each WarehouseTransaction to a Location.

To accomplish this, you could loop over the WarehouseTransaction entity, try to retrieve a Location with the same value, and it you cannot find one, then create it.



I read your question a couple of times before it occurred to me that if you want to source a datagrid with Location, you must have a Location entity. If you don't have one yet, you'll need one in order to have a datagrid of locations.

So lets assume you have created Location, and have a 1 to many association between Location and WarehouseTransaction (each Location can have many WarehouseTransactions, but each WarehouseTransaction can have only 1 Location). Lets also assume that this is populated as Eric describes in his answer. If you retrieve Location and use an XPath that limits the retrieve to a set of WarehouseTransactions, the Retrieve will return a unique list of Locations. For instance, lets say WarehouseTransaction has a transaction date, and your retrieve has an XPath that limits the Location to only those transactions that occurred in October 2015 (via the association between Location and WarehouseTransaction), the resulting list will contain the unique Locations that had a transaction in October.

Hope that helps,



Try the list function filter:




Hi all, 

I tried to solve it like it is described above, but I'm missing something and don't know where and what. 


- One entity with a few attributes. MachineID, TransactionID (see picture) etc.. Some records have the same MachineID and I want to delete the duplicated records and after that, count all that records with the unique Machine ID.

- I have the following Microflow.