cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Smilee279
Helper I
Helper I

Change Combobox value based on gallery checkbox selection

Hi All!

 

I've got a form that I created based on a sharepoint list.  I created a gallery with checkboxes (instead of a multi-selection combobox) inside that datacard.  

 

I have a status combobox in the same form that I want to change the values based on the selection in that gallery--but ONLY if a specific checkbox in that gallery is selected.  If the checkbox is not selected, leave the combobox alone.  

 

For the Default of the combobox I put in 

If(gallery1.Selected = "CheckboxName","Pending", Blank())

 

This is obviously not working, but I don't know what else to put in the "else" part of the If statement.  I could use some tips on the best way to do this.  

 

1 ACCEPTED SOLUTION

Accepted Solutions
Smilee279
Helper I
Helper I

@RandyHayes Thanks for this!  I ended up discussing this with a co-worker who is using Automate to do this.  I'm trying to create a badge access request system, and some of the areas (the checkboxes) require approvals, which require emails to trigger approvals.  My co-worker had created an automate flow to do this, and his flow might work better than me trying put everything into the app.  Along these lines:

https://alextofan.com/2019/10/02/how-to-send-approval-requests-to-groups-in-microsoft-flow/ 

View solution in original post

2 REPLIES 2
RandyHayes
Super User III
Super User III

@Smilee279 

The Default property on a Combobox actually does nothing (not sure why it is there even).

You will need to set the items in the DefaultSelectedItems (DSI) property of the control.

 

Your DSI property needs to be a record or table (depending if you have multi-select enabled) that is identical to the Items property record schema.

IF you are using a function such as Choices in the Items property, it will be a table with a single column called Value.  So, your DSI property would be:

    If(yourGalleryControl.Value, {Value: "Pending"})

 

NOW...as to your Gallery checkbox - You need better criteria than Gallery1.Selected = "CheckboxName" as this is not going to be valid.  But, I am not sure of your scenario on the Gallery and how you are displaying that (i.e. the Items property).

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
Smilee279
Helper I
Helper I

@RandyHayes Thanks for this!  I ended up discussing this with a co-worker who is using Automate to do this.  I'm trying to create a badge access request system, and some of the areas (the checkboxes) require approvals, which require emails to trigger approvals.  My co-worker had created an automate flow to do this, and his flow might work better than me trying put everything into the app.  Along these lines:

https://alextofan.com/2019/10/02/how-to-send-approval-requests-to-groups-in-microsoft-flow/ 

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,139)