Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Visibility Conditions not working properly

Good day!


This is gonna be a long read, but I hope you find this as a challenge also because I've been searching through the depths of my brain for the answer these past few days.


I have this card "cardWPSignsAdequateActionTaken" with a label text "Action Taken" from a form that has a visibility condition of:



    cardFirebreaksWaterPoints.Visible = true &&
    tglFirebreaksWaterPoints.Value = true &&
    cardWPSignsAdequateFollowupActionRequired.Visible = true &&
    tglWPSignsAdequateFollowupActionRequired.Value = false,




This condition relies on the value of 2 toggle buttons and also the visibility of the cards they are in to also consider not just their value, but also if they are really supposed to be showing.


The card "cardFirebreakWaterPoints" has a visibility condition set as






The card "cardWPSignsAdequateFollowupActionRequired" has a visibility condition set as



    cardFirebreaksWaterPoints.Visible = true &&
    tglFirebreaksWaterPoints.Value = true &&
    cardWPSignsAdequate.Visible = true &&
    tglWPSignsAdequate.Value = false,




I know this is quite hard to follow, but this is the visibility condition for the card "cardWPSignsAdequate"


    cardFirebreaksWaterPoints.Visible = true &&
    tglFirebreaksWaterPoints.Value = true,



To make it easier for everyone, I created a label field that will show the values of the cards visibility and toggle buttons (for logging purposes) to see if the visibility condition were met:




"cardFirebreaksWaterPoints: " & cardFirebreaksWaterPoints.Visible &
"  tglWPSignsAdequate: " & tglWPSignsAdequate.Value &
"  tglFirebreaksWaterPoints: " & tglFirebreaksWaterPoints.Value &
"  cardWPSignsAdequateFollowupActionRequired: " & cardWPSignsAdequateFollowupActionRequired.Visible &
"  tglWPSignsAdequateFollowupActionRequired: " & tglWPSignsAdequateFollowupActionRequired.Value





Okay, so here is where the trouble comes in. When I checked on the card that I mentioned in the beginning, it was appearing on the form. But when checking the loggings from the label I created, the values returned should tell us that the card is not supposed to be visible.

Check loggings on the label belowCheck loggings on the label below

Checking the logging values found on the screenshot above, the values notable for the visibility of the "Action Taken" field are


    cardFirebreaksWaterPoints.Visible: true
    tglFirebreaksWaterPoints.Value: true
    cardWPSignsAdequateFollowupActionRequired.Visible: false
    tglWPSignsAdequateFollowupActionRequired.Value: false



So if we check back the visibility condition of the "Action Taken" field, it should return "false" since the value of cardWPSignsAdequateFollowupActionRequired.Visible returned on the logging label is false.

Whereas in its visibility condition, it was expecting it as true before it appears.


So clearly, even if it didn't meet the conditions, the card still appeared.


To make the scenario more confusing, let me tell you how I ended up with this.

Before you proceed reading, let me enlighten you that the evidence above clearly shows us that there was something wrong already on the appearance of the card since it wasn't supposed to be visible because the logging said otherwise.

Anyway, this form is handling offline data by saving drafts into a collection.

So first this I did was created a new form, then saved it as draft using Collect functionality.

Then, I edited the draft by editing the same form which is now using the BrowseGallery1.Selected item, which is this exact item I created a while ago.

On this phase, the "Action Taken" field is now showing as expected.

Now, I saved the changes of the draft by using Patch functionality which targets on the same item, BrowseGallery1.Selected.

Then, I tried editing the same item again, then voila, the issue now appeared.


I don't know what happened here, but the point is, the values from the loggings tell us that the visibility of the "Action Taken" field is not supposed to appear, but its behavior showed us otherwise.


I can provide more information about this if ever you reached up to this point.


Have a nice day!



Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

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