web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : MkAcb7axQhD5ywSN/yIrEk
Power Apps - Building Power Apps
Answered

Forms: Logic to Hide Fields Based on Other Field Value Not Working

Like (0) ShareShare
ReportReport
Posted on 30 Apr 2020 15:22:45 by 222

I hope someone can help me. I have scoured the web and found what I thought was the solution, but I get an error message. The first question on my form asks if this is Account Type A or Account Type B. I experimented with both choice fields and yes/no toggle and opted for y/n. My flow works just fine with this option, but I can retool it if I need a choice field to make my form work.

I have 2 types of accounts: Account A or Account B. Account B also has 2 program types, B Program 1 and B Program 2. The fields the user needs to fill out vary depending on the selection:

FieldColumn (click to edit)Account AAccount B Program 1Account B Program 2
1What Type of Account?X  
2A Account NumberX  
3A Program TypeX  
4B Account Number XX
5B Account Name XX
6B Program Type XX
7Launch DateXXX
8User Invitation DateXXX
9Rep NameXXX
10Sales LeadX  
11Group NameXXX
12On Call ExpertsXXX
13UsersXX 
14NotesXXX

 

This should be a simple matter of applying logic to a field that if the selection in question 1 is true, make fields 4, 5, and 6 not visible and so on. The formula I found is this:

If(DataCardValue1 = ExpectedValue, true, false)

When I use this formula, I get an error that the formula uses scope, which is not presently supported for evaluation:

 

1.png

 

2.png

 

I figured maybe it was just a problem with the y/n, so I changed it to a choice field. Same thing:

 

3.png

 

4.png

 

Why isn't this working? What do these errors mean? If I was using Nintex or even InfoPath, I'd have been done by now.

  • ACPBSCi Profile Picture
    222 on 30 Apr 2020 at 16:36:26
    Re: Forms: Logic to Hide Fields Based on Other Field Value Not Working

    THANK YOU!!!!

    Ugh, this is so confusing! I wish Forms were more intuitive. This is like laying pipe. No, I take that back. Laying pipe is easier. Working with forms used to be easy, now it's really hard.

    Thank you so much!!

  • Verified answer
    mdevaney Profile Picture
    29,987 Moderator on 30 Apr 2020 at 16:27:30
    Re: Forms: Logic to Hide Fields Based on Other Field Value Not Working

    @ACPBSCi 
    DataCardValue13 is a ComboBox control.  This is why my previous suggest did not work.  I assumed you were using a TextInput control.

     

    You'll want to use this code instead.

    If(DataCardValue1.Selected.Value = ExpectedValue, true, false)

     

    If there is no property called Value you can use a different column name

    If(DataCardValue1.Selected.your_column_name= ExpectedValue, true, false)

     

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Verified answer
    eka24 Profile Picture
    20,921 on 30 Apr 2020 at 16:16:56
    Re: Forms: Logic to Hide Fields Based on Other Field Value Not Working

    Change it to:
    If(DataCardValue13.Selected.Value="A",true,false)

    or

    If(DataCardValue13.Selected="A",true,false)

     

    If it does not work, select DataCardValue13 and take a screen shot, want to see what you put in the ITEMS

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • ACPBSCi Profile Picture
    222 on 30 Apr 2020 at 16:09:23
    Re: Forms: Logic to Hide Fields Based on Other Field Value Not Working

    Hmm...still not working...

    So rather than use the control, I need to use the name of the datacard?

     

    5.png

     

     

     

     

     

     

     

     

     

    Is that true for all formulas?

    I am definitely getting closer. I finally got a formula with no error, but I had to use SearchText because it gave me an error when I typed in just "Text":

    If(DataCardValue13.SearchText="A",true,false)

    However, my card is permanently hidden and it doesn't do anything based on my selection. Why is .Text available for everyone else and not me? It's a text choice field that my show/hide is based off of.

  • eka24 Profile Picture
    20,921 on 30 Apr 2020 at 15:38:49
    Re: Forms: Logic to Hide Fields Based on Other Field Value Not Working

    Take this example DatacaraValue1 and DatacaraValue2.

    If you want to hide Datacard for DatacaraValue1  based on what is in DatacaraValue2 then:

     

    Visible of DatacaraValue1 put:

    If(DataCardValue2.Text = "ExpectedValue", true, false)

     

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • mdevaney Profile Picture
    29,987 Moderator on 30 Apr 2020 at 15:38:11
    Re: Forms: Logic to Hide Fields Based on Other Field Value Not Working

    @ACPBSCi 
    I think you are close to the solution: you are just missing the Text property of the DataCardValue control.

     

    If(DataCardValue1.Text = ExpectedValue, true, false)

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2