cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Smilee279
Frequent Visitor

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
Frequent Visitor

@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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
Smilee279
Frequent Visitor

@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

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (46,723)