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 / Populating Default Ite...
Power Apps
Suggested Answer

Populating Default Items of a Multi-Select Combobox from a text string

(1) ShareShare
ReportReport
Posted on by 68
Hello!
 
So I have an app where users can choose from a list of names (formatted First Last) to give credit on a certain event. That list of names exists as a dataverse table, and the selected names are stored as text in a separate table. Later on, to allow the user to edit it through the dropdown, I need to populate the dropdown of users based on the text separated list. \
 
Sorry I know its kind of confusing, but basically, I need to transform a comma separated list (e.g. "John Smith, Joe Schmoe") and perform what I assume is a lookup function on a separate table to see what entries match those names (e.g. user_firstlast = John Smith and user_firstlast = Joe Schmoe) and then choose those as the default values of a multi-select combobox. Unfortunately, I have to store it as text, so I have to do it this way. Anything helps, thank you!
Categories:
I have the same question (0)
  • Suggested answer
    BCBuizer Profile Picture
    22,756 Super User 2026 Season 1 on at
     
    Is the reason you are using a csv due to having a many-to-many relatinoship between the events (?) and users (?) tables? If so, you can simply create a many-to-many relationship between the two tables using this article: Create many-to-many table relationships in Microsoft Dataverse overview - Power Apps | Microsoft Learn
     
    Then, using a reply I posted earlier, you can find how to use a combobox to be populated by default with the related items for a selected item from the one table (events?) to the other table (users?) and how to then edit those: https://community.powerplatform.com/forums/thread/details/?commentid=523bb83e-1b59-f111-bec7-0022482aa3a2
     
     
    In case this is beyond you, you may stick with the csv method and use something like the below formulat for the DefaultSelectedItems property of the Combobox to have it populated by default:
     
    With(
       {
          _Names: AddColumns(
             Split(
                <SelectedEvent>.<CSVColumnName>,
                ","
             ),
             CleanNames,
             Trim(Value)
          )
       },
       Filter(
          <UserTableName>,
          user_firstlast in _Names.CleanNames
       )
    )
     
    Please replace anything in <> with the actual name of the list/column to make it work.
     
     
    If this reply helped you in any way, please give it a Like 💜 and in case it resolved your issue, please mark it as the Verified Answer ✅.
  • Suggested answer
    11manish Profile Picture
    2,436 on at
    Yes, this can be achieved in Power Apps by:
    • Splitting the comma-separated text into individual names
    • Matching those names against the Dataverse table
    Returning the matching records to the ComboBox DefaultSelectedItems
     
    Example:
     
    Assume:
    The stored text field contains:
    • "John Smith, Joe Schmoe"
    Your Dataverse table is:
    • UsersTable
    The name column is:
    • user_firstlast
    Set the ComboBox DefaultSelectedItems property to:
     
    Filter(
        UsersTable,
        user_firstlast in ForAll(
            Split(ThisItem.StoredNames, ","),
            Trim(Value)
        )
    )
  • Suggested answer
    Valantis Profile Picture
    5,522 on at
     
    @BCBuizer formula is the right approach. To confirm it and explain why it works:
     
    Split() breaks your comma-separated string into a table of individual values. Trim() cleans any spaces around the names. Filter() then matches those cleaned names against your Dataverse table.
    The DefaultSelectedItems property of your combobox:
    With(
        {
            _Names: AddColumns(
                Split(YourEventTable.StoredNamesColumn, ","),
                CleanNames,
                Trim(Value)
            )
        },
        Filter(
            UsersTable,
            user_firstlast in _Names.CleanNames
        )
    )
    One thing to be aware of: the in operator used this way is not delegable to Dataverse. If your UsersTable has more than 500 rows, Filter will only check the first 500 locally. For most user tables this is fine, but if you have a large organisation consider caching the users table in a collection on app start to avoid delegation issues.
     

     

    Best regards,

    Valantis

     

    ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/

    💼 LinkedIn

    ▶️ YouTube

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 638

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard