Displaying items in a nested listview, based on the other listview

0
Hello everyone!  The next step in my project that i'm trying to finish is only displaying appointments beneath the corresponding date.  I've got a "unique dates" entity, together with a "appointments" entity. Right now, they have not got an association between them.  The unique dates are all the unique dates from the appointment entity. They are displayed in a list view. Within that list view, I've got a listview that shows the appointments. Is it possible to with a microflow, javascript or something else, to check the date of the above list view, and only display appointments that have the same date?  I was thinking along the lines of a if / else statement.  Am I making this harder then it should be with this approach?  The appointments below, should be distributed over the 2 dates. Right now, I'm only sorting on date/time ascending instead of looking at the date above. So both dates have the same list of appointments.     
asked
1 answers
2

Jan,

The microflow DS_Rooster_bij_persoon_gesorteerd_op_datum should have a parameter of Rooster_Uniekedagen.  If so, you can use the date from that entity to constrain the list of appointments being returned.  I am not sure what attributes you have in that entity, but I will assume you only have one date attribute.  To constrain you could:

  • create a variable for the start of the day using the function trimToDays($Rooster_Uniekdagen/DateAttribute)
  • create a second variable for the start of the next day using the function addDays(trimToDays($Rooster_Uniekedagen/DateAttribute),1)
  • In the retrieve, use xpath to constrain the dates of the the appointments retrieved (something like ApptDateStart >= $StartOfDay and ApptDateStart < $StartOfNextDay )  You'll need to decide what conditions you want to use, i.e. should the appt start in a given day, start and end in a given day, what happens if an appointment spans 2 days, etc.

Hope that helps,

Mike

answered