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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / how do i collect the s...
Power Apps
Unanswered

how do i collect the selected items in a people combox box to store upon a form submit as the new default value?

(0) ShareShare
ReportReport
Posted on by 432

i have a person combobox, i want its default selected items (or default vaue?) to be what the user chooses from the dropdown, or another static record/table option i choose, depending on some if condition.

Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @dperez13 ,

     

    You will want to set the DefaultSelectedItems property to:

     

    If( Yourcondition,
     OtherComboBox.SelectedItems,
     {
     DisplayName: "The display name of the user you want to set as default",
     Claims: "i:0#.f|membership|" & Lower("The email address of the user you want to set as default")
     }
    )
  • dperez13 Profile Picture
    432 on at

    thanks, right now im having this unusual behavior where i have a multi select comobox and its value doesnt stick when multiple people are select, and another column goes blank entirely when multi people people are select in that combobox.

     

    what could make one value go blank based off another value in another box?

  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @dperez13 ,

     

    How are you saving the values of these comboboxes? Is it through a form control or a Patch() function?

     

    If it is a form, please share the Update properties of the impacted DataCards.

  • dperez13 Profile Picture
    432 on at

    it was the update property, i was trying to loop through for each selected item .

     

    what is the difference between default and defaultselecteditems in the valuebox of a combobox datacard?

     

    and when users select multiple people in a a combobox, how do I grab all of them into an array or make sure that on formload, those people will still be there and saved into the sharepoint list, while also adding my own custom "person". i think i needed to use clearCollect all this time, but im not sure.

     

    basically the use case was this:

     

    1) user person single select drop down is chosen

    2)office365v2getmanagerv2 (selected datacard . Email).mail is used  to grab the manager of that user 

    (dont have the code accessible

    3) in the manager box (step 3), i wanted the logic to work like this. let it autopopulate the manager(step 2) based off the user person single select dropdown (step 1) on form start, if  'onselect' or 'onchange' the form user decides to override this autopopulate step 2/step1 action with other chosen managers.

    conflict: upon re-entering the form, it once again autopopulates to the associate manager there, instead of sticking to the record/table values of the manager combobox (step 3)  that the user had previously overridden them with, among other very unusual behaviors, like clearing other seemingly unrelated columns due to patch function mishaps I presume..

  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @dperez13 ,

     

    1. Good you found the issue. Is it now working?

    2. Default is old: don't use it. DefaultSelectedItem is new: do use it.

    3. You can refer to ComboBox.SelectedItems to get all selected people in a people picker

    4. The below may do it for you then. This checks if the field has a value in the data source and if it has, it will display it. If it is blank, for instance when the form is in FormMode.New, it will use tyour formula (when you have it handy) to populate the field:

    Coalesce(
     Parent.Default, 
     //office365v2getmanagerv2 (selected datacard . Email).mail
    )
  • dperez13 Profile Picture
    432 on at

    where did you envision i put that code? 

  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @dperez13 ,

     

    This is still for the DefaultSelectedItems property.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard