datagrid xpath distinct?!

0
Hi, is there a way to restrict the records shown in a datagrid with XPATH just like a SQL DISTINCT without using a microflow to populate the datagrid? e.g. entities (Case 1:m CaseItem) Search fields e.g. (Name field from Case parent entity) and dates from and to from (ItemDate field from CaseItem child entity) I wanted to use the visible Search fields to retrieve parent entity (case) record list based on child entity (CaseItem) search fields. I know I can list the parent records but I wanted to constraint to just one Case where more than one CaseItems exist. For example... Case #1 John Smith Item1a date 01/09/2012 Item1b date 03/09/2012 Item1c date 14/09/2012 Case #2 Sara Jones Item2a date 10/09/2012 I would like to see the datagrid showing: Case 1# John Smith Case 2# Sara Jones and NOT the following: Case 1# John Smith Case 1# John Smith Case 2# Sara Jones Case 1# John Smith Any ideas?!
asked
2 answers
0

This could be a workaround:

Add a boolean to the entity and call it 'distinct' for example. Then make a microflow to check whether the name for the Case Items is distinct when you add a new object and set the boolean accordingly.

Then you can add an xpath on the datagrid with this newly created boolean, so you only see the objects with distinct names.

answered
0

You have to base the Grid on the Case entity. You can create a search filter based on a referenced field, in your case the CaseItem entity.

Add a dateselector and in the connector choose the case/case_caseItem/caseItem/Date

answered