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

DisplayMode Logic: Checkboxes AND Text Input Value

I have a gallery using checkboxes that if checked will allow a dropdown box to become visible:

CrimsonCrayon_0-1655139202140.pngCrimsonCrayon_1-1655139232894.png

 

I am trying to figure out the SUBMIT button logic that will allow a user to submit if they check "NET" AND the value of "Copy NET" does NOT equal "NA"

 

Here is what I have so far:

If(
    (Form1_1.Valid And 
    "NET" in colGalleryCheckboxData.Value And IsBlank(ErrorMessageNET.Text)
     )  ,
     DisplayMode.Edit,Disabled
     )

 

The problem is... I have a multiple checkboxes that need to use this same sort of validation:


IF "NET" is checked and the value does not equal "NA"... proceed, else fail.

IF "NET" is NOT checked at all, proceed (if everything else is valid)

 

1 ACCEPTED SOLUTION

Accepted Solutions
CrimsonCrayon
Helper I
Helper I

I solved this by setting variables in the OnCheck and OnUncheck in the combo multi checkbox gallery, as well as using the Text of the error message and finally with DisplayMode of the submit button.

The code on the submit button looks something like this for every checkbox + dropdown value in my form. "varNETCheck" was the variable I set as true on the OnCheck and false on the OnUncheck. 

If(varNETCheck && !IsBlank(ErrorMessageNET.Text), false, true)

 

View solution in original post

1 REPLY 1
CrimsonCrayon
Helper I
Helper I

I solved this by setting variables in the OnCheck and OnUncheck in the combo multi checkbox gallery, as well as using the Text of the error message and finally with DisplayMode of the submit button.

The code on the submit button looks something like this for every checkbox + dropdown value in my form. "varNETCheck" was the variable I set as true on the OnCheck and false on the OnUncheck. 

If(varNETCheck && !IsBlank(ErrorMessageNET.Text), false, true)

 

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Solution Authors
Top Kudoed Authors
Users online (2,087)