web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Collect Multi Select C...
Power Apps
Answered

Collect Multi Select Combo box Unique values into collection

(0) ShareShare
ReportReport
Posted on by 35

Hello,

I have multiselect combo box in my Power App, On Change Property of Comb Box I am collecting values in collection which are selected in combo box. But when I am removing any value from Combo box its adding again all the combo box existing value into Collection leading to duplicate values in it.

I want that when I remove any value from combo box that should be remove from collection also and no duplicate or existing value should be added in collection.

Categories:
  • zaphod88 Profile Picture
    502 on at

    Which formula are you using to collect?
    If you are not already doing it, try using ClearCollect(Collection, Self.SelectedItems). This way the collection always has the same records as the combobox.

  • Deepshikha21 Profile Picture
    35 on at

    Hi @zaphod88 ,

    I am using below formula - 

    Collect(EventContacts,{Contact:DataCardValue7_1.Selected.'Full Name',checkIn:"No",isLead:"No"});
    And I am using same collection in Gallery to update values of this collection , so If I will use ClearCollect on On change property the all the data which is updated in same collection from gallery will be cleared.
  • zaphod88 Profile Picture
    502 on at

    If I get you right, the collection should only contain one record for each DataCardValue7_1.Selected?
    Try
    If(!IsEmpty(Filter(EventsContacts, DataCardValue7_1.Selected.'Full Name = Contact)),

    RemoveIf(EventsContacts, DataCardValue7_1.Selected.'Full Name = Contact),

    Collect(EventContacts,{Contact:DataCardValue7_1.Selected.'Full Name',checkIn:"No",isLead:"No"}))

  • Verified answer
    v-albai-msft Profile Picture
    Microsoft Employee on at

    Hi @Deepshikha21 ,

    You can try below formula:

     

    If(IsBlank(LookUp(EventContacts,Contact=DataCardValueX.Selected.'Full Name')),
    Collect(EventContacts,{Contact:DataCardValueX.Selected.'Full Name',checkIn:"No",isLead:"No"}))

     

    This time, only when the selected value doesn't exist in the collection, Collect function will add this selected value into collection.

    Best regards,

    Allen

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 394 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

Last 30 days Overall leaderboard