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 / DefaultSelectedItems i...
Power Apps
Answered

DefaultSelectedItems in ComboBox

(0) ShareShare
ReportReport
Posted on by 15

Hi,

 

I have ComboBox with items from office365 users connector and collection with a few items (MailNickname). I try to set default items from this collection but ComboBox returns me items called [object Object]

 

My DefaultSelectedItems Property: ForAll(Logins,Office365Users.SearchUser({searchTerm:Result}))

 

What am i do wrong ?

 

Thanks

 

Categories:
I have the same question (0)
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    The other day I helped someone with that.

     

    I did something like this:


    ForAll(Logins;

              ClearCollect(ColDefaults;

              {
              User: {
                        DisplayName: UtilizadoresdoOffice365.UserProfile(Email).DisplayName;
                        Claims: "i:0#.f|membership|" & Lower(Email);
                        UserPrincipalName: UtilizadoresdoOffice365.UserProfile(Email).UserPrincipalName
                       }
               }

             )

    )

     

     

    So, create a subcolection with that or when tou create your Collection "Loggins" create with that field and, in DefaultSeclectedItens write:

     

    ForAll(ColDefaults; User)

     

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

    Check my LinkedIn!

    Check my User Group (pt-PT)!

    Last Post on Community

    My website!

  • kilerfcb Profile Picture
    15 on at

    I am afraid that i dont understand it 🙂

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Show me how you create your Logins collection.

  • kilerfcb Profile Picture
    15 on at

    Collect(
    Logins,
    Split(
    Users.Text,
    ";"
    )
    )

     

     

     

  • Verified answer
    kilerfcb Profile Picture
    15 on at

    And if i try do that

    ForAll(Logins;

              ClearCollect(ColDefaults;

              {
              User: {
                        DisplayName: UtilizadoresdoOffice365.UserProfile(Email).DisplayName;
                        Claims: "i:0#.f|membership|" & Lower(Email);
                        UserPrincipalName: UtilizadoresdoOffice365.UserProfile(Email).UserPrincipalName
                       }
               }

             )

    )

     

    I have error "This function cannot be invoked within ForAll"

  • kilerfcb Profile Picture
    15 on at

    Ok sorry, a replace ClearCollect to Collect... and it's ok. Your solution works but i don't use in subcollection this: "Claims: "i:0#.f|membership|" & Lower(Email);" What it doing ?

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Do you have the Office365Users Connector??

    Plus, you MUST check the names and the connectors.

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

    Check my LinkedIn!

    Check my User Group (pt-PT)!

    Last Post on Community

    My website!

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 494

#2
WarrenBelz Profile Picture

WarrenBelz 352 Most Valuable Professional

#3
11manish Profile Picture

11manish 323

Last 30 days Overall leaderboard