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 / Dynamic check box item...
Power Apps
Unanswered

Dynamic check box items based on selections from drop down or combo box

(0) ShareShare
ReportReport
Posted on by 14

Hello All,

Using PowerApps,  I need to create the following entry (Update) form) and also create the ideal Excel table on OneDrive to store data entered to this form.

The form should look like this:

actual submission date 2.jpg

Each product has its corresponding countries from total 20 options, and the data that needs to be manually updated is a date for each country. So when a product item selected, the list of countries change to fit the selected product. A user needs to first select a product, then check some or all countries, and enter dates in front of selected countries, and submit this to an Excel table (To be created). Then the process repeats with the same product and Lift ID as the dates are not always available for all countries at once, or with different product or Lift ID.

The products and selected countries currently looks like this:

actual submission date 3.jpg

Where 1 means this is supported country for that specific SKU or Product. The list of checkboxes in the PowerApps form should dynamically change to the selected countries that have the value of 1 for the selected Product.

Is this possible with PowerApps? How to create the form and the table that stores the data submitted by it?

Thanks,

Ayman

 

 

 

Categories:
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @aymanhassanmct :

    I made a demo and don't know if it meets your needs.If you have any questions, please point out.

    t3.gif

    I have two tables:

    Table1:

    Column1Country1Counrty2Counrty3

    SKU1101
    SKU2001
    SKU3010
    SKU4111
    SKU5100
    SKU6010
    SKU7011
    SKU8101
    SKU9100
    SKU10000

    Table2:

    PropductCountryLiftIDDateCheckBox

    PropductCountryLiftIDDateCheckBox
         

    Step1:Add adrop down control(Dropdown3)

    Item:

     

    Table1.Column1

     

    Step2:Add a gallery(Gallery7)

    Item:

     

    Filter(Split(
     If(LookUp(Table1,Column1 = Dropdown3.SelectedText.Value).Country1 = "1","Country1##") & 
     If(LookUp(Table1,Column1 = Dropdown3.SelectedText.Value).Counrty2 = "1","Counrty2##") & 
     If(LookUp(Table1,Column1 = Dropdown3.SelectedText.Value).Counrty3 = "1","Counrty3##"),
     "##"
     ),
    !IsBlank(Result))

     

    Step3:Add a Checkbox into this gallery(Checkbox1)

    Step4:Add a DatePicker control into this gallery(DatePicker1)

    Step5:Add a button

    OnSelect:

     

    ForAll(
     Gallery7.AllItems,
     Patch(
     Table2,
     Defaults(Table2),
     {
     CheckBox: Checkbox1.Value,
     Propduct: Dropdown3.SelectedText.Value,
     Date: DatePicker1.SelectedDate,
     Country: Result
     }
     )
    )

     

    When the user presses this button, new records will be added to Table2 one by one.

    Best Regards,

    Bof

     

  • aymanhassanmct Profile Picture
    14 on at

    Looks good. I am testing it.

    This will not post any data about unchecked countries. Right?

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @aymanhassanmct :

    If so,you shoud set the button's OnSelect property to:

     

    ForAll(
        Filter(Gallery7.AllItems,Checkbox1.Value),
        Patch(
            Table2,
            Defaults(Table2),
            {
                CheckBox: Checkbox1.Value,
                Propduct: Dropdown3.SelectedText.Value,
                Date: DatePicker1.SelectedDate,
                Country: Result
            }
        )
    )

    Best Regards,

    Bof

  • aymanhassanmct Profile Picture
    14 on at

    Thank you again Bof, I found out that I have more than 20 countries in the actual data.

    Is there any simplified code instead of using If in the items filter in the gallery?

    Thank you again.

    Ayman

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @aymanhassanmct :

    I am afraid there is no way to simplify the code. Because "country" is a field name, but there is no way to get the field name through a formula.

    Although the formula is a bit ugly, it is easier to operate without extensive modification.

    Bet Regards,

    Bof

  • aymanhassanmct Profile Picture
    14 on at

    The items code looks fine but the country option does not appear with each checkbox. I think I missed something critical. Please help.

     

    countrynames.jpg

     

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @aymanhassanmct :

    Please add a label control into this gallery and set it's text proeprty to:

    dropdown.SelectedText.Value

    Best Regards,

    Bof

  • aymanhassanmct Profile Picture
    14 on at

    Thank you sir,

    This code populated the selected value from the above box.

    I need to shoe the country name which is the column header in this table.

     

    actual submission date 3.jpg

     

    Results now are (Option), I need tha labels of the checkboxes in the gallery reflect the countries in this table with the values of 1 for the selected SKU

     

    Regards,

  • aymanhassanmct Profile Picture
    14 on at

    Up Up

  • aymanhassanmct Profile Picture
    14 on at

    @v-bofeng-msft

    Any update please?

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 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard