cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Thanasis
Advocate II
Advocate II

Comb box to control visibility of checkboxes

What I am trying to do is ,  I have a combobox that you can select multiple options. If you select the option "Encompass" I want 2 checkboxes (Yes and No) to appear.
IF you select the Yes checkbox I want a text input to appear and the No checkbox to disappear. 
If you select the No checkbox I want an attachment upload to appear and the Yes checkbox to disappear.
I have them kind of working but I need some help to finish it.
What I am having trouble is when you select from the data source encompass first and then you pick another one, my checkboxes disappear even if Encompass is selected, but also what I want is if you deselect encompass I want to reset the comboxes to no checkmarks and the texinput to disappear also.
I know its a lot please let me know if you need more information. This is what I have done 

 

I have my Datasource the onchange properties to be :

 

If(ComboBoxDataSource.Selected.Value="Encompass", Reset(CheckboxYes), false )

 

Thanasis_1-1618586740646.png

 

For Yes and No checkboxes I have this oncheck and Unkceck 
oncheck:  UpdateContext({vis:true}) / UpdateContext({vis2:true})
uncheck:  UpdateContext({vis:true}) /  UpdateContext({vis2:true})

 

and for the visibility of my text input and my Attachment I have set is as

vis and vis2.

 

If you need any more information please let me know. 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@Thanasis 

Set your Visible properties as follows:

YesCheckBox:  "Encompass" in ComboBoxDataSource.SelectedItems.Value && !NoCheckBox.Value (note: Value may not be an applicable column in your items table - substitute for correct one if needed or reply back with the items property of the combobox)

NoCheckBox:  YesCheckBox.Visible && !YesCheckBox.Value

TextInput control:  YesCheckBox.Value

AttachmentUpload : NoCheckBox.Value

 

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!

View solution in original post

3 REPLIES 3
RandyHayes
Super User III
Super User III

@Thanasis 

Set your Visible properties as follows:

YesCheckBox:  "Encompass" in ComboBoxDataSource.SelectedItems.Value && !NoCheckBox.Value (note: Value may not be an applicable column in your items table - substitute for correct one if needed or reply back with the items property of the combobox)

NoCheckBox:  YesCheckBox.Visible && !YesCheckBox.Value

TextInput control:  YesCheckBox.Value

AttachmentUpload : NoCheckBox.Value

 

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!

View solution in original post

RodCha
Frequent Visitor

PA_S1.png

PA_S2.png

  

  

Thanasis
Advocate II
Advocate II

Hello @RandyHayes 

Thank you, that fixed my issue. I did had an issue with the Nocheckbox. I had to change visible properties to :

"Encompass" in ComboBoxDataSource.SelectedItems.Value && !Yescheckbox.Value

because YesCheckBox.Visible && !YesCheckBox.Value once click would make the No disappear too. 
I also changed my on change property for Data source to :  
because if someone decides to uncheck it, if they made a mistake, I want everything to be reset. 

If(ComboBoxDataSource.Selected.Value="Encompass", Reset(Yescheckbox) && Reset(Nocheckbox) && Reset(TextAddFolderName) && ResetForm(Form6) , false )

my attachment visible property to:

"Encompass" in ComboBoxDataSource.SelectedItems.Value && Nocheckbox.Value

and my Texinput visible property to:

"Encompass" in ComboBoxDataSource.SelectedItems.Value && Yescheckbox.Value


I also want to thank @RodCha  for your input. 

 

 

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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (68,589)