Remove duplicates in an array

Good Afternoon,

Is there a quick way of removing duplicates in an array?

Thank you...

OriginalPostID-119980

OriginalPostID-119980

  Discussion posts and replies are publicly visible

Parents
  • i believe it may not work for document array as the documents themselves have different ids..

    pv!KCToSearch_kc icontains the knowledge centre

    =finddocumentsbyname(false(),"*",pv!KCToSearch_kc) stored into
    pv!documentsInKC_documentA

    Next script task:

    union(pv!documentsInKC_documentA,pv!documentsInKC_documentA)
    storing to noDuplicatesDocumentsInKC_documentA

    i was hoping the duplicates would be removed but noDuplicatesDocumentsInKC_documentA is the same as pv!documentsInKC_documentA

    I basically need to be able to rename mulitple documents but in the dropdown list only display the each doc name once as currently the list is huge with every document name in there even though there is a lot of duplicate names...

    Thank you in advance
Reply
  • i believe it may not work for document array as the documents themselves have different ids..

    pv!KCToSearch_kc icontains the knowledge centre

    =finddocumentsbyname(false(),"*",pv!KCToSearch_kc) stored into
    pv!documentsInKC_documentA

    Next script task:

    union(pv!documentsInKC_documentA,pv!documentsInKC_documentA)
    storing to noDuplicatesDocumentsInKC_documentA

    i was hoping the duplicates would be removed but noDuplicatesDocumentsInKC_documentA is the same as pv!documentsInKC_documentA

    I basically need to be able to rename mulitple documents but in the dropdown list only display the each doc name once as currently the list is huge with every document name in there even though there is a lot of duplicate names...

    Thank you in advance
Children
No Data