Sorting one item out of list of items with same name

0
Hi all, I have one attribute called as SCName in which there are list of items but 5-6 items have same name i want to display only one item out of those list. And when i click on that one item/button, then  i want to see all list of 5-6 items with same name, what can i do?
asked
2 answers
6

Hi,

Create a DS Microflow for the list which is displayed and remove the duplicates as shown below

  • Retrieve all records
  • For each record, check if it's the only one with its unique key (in your case SCName)
  • If so, add them to a list of items from the list you're iterating over
  • After the loop completes, return the list

 

Hope it helps!!!

answered
1

Hi Zia,

If you want to achieve this you should use a data source microflow for the listview. In the datasource you retrieve all items of this entity, create a new list of this entity called entity_Show and loop over the items on the original list.

Here you use the list operation ‘find’. If you find an item with the same name in entity_show then do nothing and go to a continue event, if the item is not yet found add the iterator to entity_show, this is the list you will give back in the end event.

Then you can set a default button that when you click on an item, a microflow will retrieve all other items with the same name and show these on a page.

Hope this helps! 

 

P.s. Looking at the issue you are facing, you might want to change your domain model. Set the SCName attribute on a seperate entity and associate this with the entity you are showing now. Now you can show the new entity in the listview and use another listview on the right, with the listen to widget datasource, which shows all the associated items.

answered