Hi,
I have one structure named Company[id,name] and i am appending three different company in List of Company Structure but if i will append two company with same name in list then how can i find the duplicate company in List of company ?
Thanks & Regards
DM Singh
sorting by name and simply check current with previous for example.
if you store them in the database, just do a aggregate by name and then check on id...
J. wrote:
Hi J,
If we don't have any unique attributes,how can we remove duplicate values from structure?
Regards,
Ronan
Ronan T wrote:
Hi Ronan T,
What do you mean that there is no unique column in the structure , then in that case how you know if there is duplicate value .
As you mentioned , your structure has 2 columns namely Id and name , then in this case there can be only 3 possible cases to find duplicate .
1 .When you Id has same value .
2. When your Name column has same value .
3. Both your column has same value.
based on your requirement ,
If you don't want to insert duplicate value then before appending to the list ,use listfilter and check the condition.
If you want to find if your list has duplicate value or not , loop through your list and user listfilter on the same list . If the filtered list has 2 or more value you have duplicate entry there.
If you are getting the list from Advance SQL or Aggregate then you can do as J suggested.
Hi DM,
If you are using version 11, you can use the ListDistinct to remove duplicates from a list.
Daniel
Daniƫl Kuhlmann wrote:
Hii Daniel,
Can u explain me how to use this List Distinct to remove duplicate in step by step manner
Thanks
Harshita sharma
Hi Harshita,
https://success.outsystems.com/Documentation/11/Reference/OutSystems_APIs/System_Actions#ListDistinct
Hi Guys, can I find the ListDistinct on personal environment am trying to search I can not find it from dependency am using outsystems 11
You are awaking an old discussion from summer 2020, next time please create a new post.
That ListDistinct is available in all editions of OutSystems. It's on the system module: