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 / creating a Combo list ...
Power Apps
Suggested Answer

creating a Combo list that Defaults from one table and saves to another

(0) ShareShare
ReportReport
Posted on by
Hello... I am an absolute noobe to power apps so please be patient with me.
 
I  have two tables Designers and Products. (I have set up a many to many relationship for these not sure if that is correct/needed)
 
The Designers table has a list of designers with a two letter "Designer Code" for each. 
 
In the Products Table I have a bunch of item some of which could have been designed by multiple designers these are held in the Code field.
 
I am trying to create a combobox in my Products edit screen that will be able to:
 
1. link to the Designer Code field (in designer) for the drop down list.
2. Default selected items based on the values already held in the Code field (I assume this is how we also display values when not editing a record?).
3 Allow to edit Selected Designer codes and update the Products->Code field accordingly.
 
I have been able to populate the dropdown combobox list with the values in Designer Code, but the other 2  points just have me stumped.
 
Any help would be appreciated 
Categories:
I have the same question (0)
  • ronaldwalcott Profile Picture
    3,906 Moderator on at
    Were you able to resolve this?
  • Suggested answer
    BCBuizer Profile Picture
    22,756 Super User 2026 Season 1 on at
     
    Assuming you are using Dataverse as a data source, and you are using a local variable, varSelectedProduct, the below should do the trick:
     
    1. Set the Items property of the combobox to Designers. Set the ItemDisplayText property to 'Designer Code'
     
    2. When setting varSelectedProduct, you also need to populate a second variable, varProductDesigners:
    UpdateContext({varProductDesigners: varSelectedProduct.Designers})
    Set the DefautlSelectedItems property of the combobox to varProductDesigners
     
    3. Add/Edit a Save button's OnSelect property to include the below formulas:
     
    ForAll(
        ComboboxName.SelectedItems,
        Relate(
            varSelectedProduct,
            ThisRecord
        )
    );
    ForAll(
        Filter(
            locProductDesigners,
            !(Designers in ForAll(
                ComboboxName.SelectedItems,
                Designers
            ))
        ),
        Unrelate(
            varSelectedProduct,
            ThisRecord
        )
    );
    UpdateContext({varSelectedProduct: LookUp(Products, Product = varSelectedProduct.Product});
    UpdateContext({varProductDesigners: varSelectedProduct.Designers})
     
    For context, what these 4 formulas do:
    1. The first ForAll loop relates all selected Designers in the combobox with the Product as saved in varSelectedProduct.
    2. The second ForAll loop removes the relationship between any Designers that were unselected in the combobox and the Product as saved in varSelectedProduct
    3.  Update varSelectedProduct with newly (un)related designers
    4.  Update varProductDesigners with newly (un)related designers
     
     
    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 ✅.
     

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