Getting back Unique values from entity. Need help with list operation find

0
Hi again! :)  I'm working on an appointments screen. It shows all your appointments in your calendar, very WIP ;)  What I wanted to add now was all the unique dates. Several appointments can be on the same day. I found several topics on this forum stating I should use an iterator object, find list operation and than add it to the list if its not on there.  Having just started with Mendix, I cant figure out how to do this. I've tried several things but cant get it to work. Also tried an exclusive split, that got me to just displaying one date instead of all the dates ;)  The set-up:  There's an entity that contains all the appointments (associated with an accounts table). Right now I have a "unique dates" entity. I think I need a unique dates entity that gets populated when you open appointments screen. From there I hope I'm able to display every date, and display the appointments that have the same date associated. Here's my microflow. I've tried adding the find at the start as well, did not change anything I'm afraid. I think I'm missing some sort of exclusive split?  I'm creating the "to be populated list".  Then Retrieving all the appointments  The iterator is going over that list  Create an object in the "unique dates" entity with the start date from the iterator.  Then the following find action   And then an add action to add the object to the unique dates list.      There's probably something very simple I'm doing wrong :P 
asked
1 answers
0

Hi Jan,

In your loop, you should start with the 'Find' action, which checks the list using the IteratorRooster object. After that an exclusive split to check if if has been found. If it has been found, no action is needed (as the day is already present in the list), you can set a 'continue' action. If is hasn't been found, create the object and add it to the list.

answered