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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How can I make a field...
Power Apps
Answered

How can I make a field visibele depending on the choice of a different field?

(0) ShareShare
ReportReport
Posted on by 12

Hello,

How can I make a field visibele depending on the choice of a different field? These fields are within a form, linked to a Dataverse table. Using a canvas app, not model driven.

 

As the user makes the choice on the editable form, the other field should appear or dissapear. The form is not saved at that time, it is for a new row in the database.

 

The field that determins the visibility of the field is called Pasta?

On the form it is Pasta?_Datacard1

It is a Yes/No datatype, but the choice is made using a dropdown menu, not a toggle.

 

On the field I want to hide I tried many versions of something like this:

If(!'Pasta?_DataCard1' = true; false; true)   This one does not show a error, but there is no functionality.
 
or
If('Pasta?'.Selected.Value = "Ja", false, true) This gives a error, .selected and .value are not correct. Or on a different version it says the . is not right.
 
Any way this could be solved?
Categories:
  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @Foxman_NL, 😊

     

    The Yes/No field is a Dataverse choice field - in order to compare this via the equals operator you will need to reference the choice list name. For a Yes/No field this will be similar to 'Pasta? (TableName)' but you can double check this by looking at the Pasta? dropdown Items property, the choice list name will be mentioned within the Choices() function. (you can copy-paste this)

     

    Additionally, since you want to change the visibility based on the current Form selection you will have to reference the dropdown (DataCardValue<Number>). The following structure will need to be written in the Visible property of the Datacard you want to hide / display dynamically:

     

    //Visible property Datacard
    //Adjust DatacardValue1 to the correct Pasta? dropdown name & change 'Pasta? (TableName)' to the correct choice list name
    
    !(DatacardValue1.Selected.Value = 'Pasta? (TableName)'.Yes)
    
    //Please note that you may have to use 'Pasta? (TableName)'.Ja instead of .Yes depending on your browser language settings.

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • Hasrie Profile Picture
    216 on at

    hi @Foxman_NL 

     

    Multiple @choices datacard with Visible control, sample attached, dropdown/combobox Visible depend on - If(DataCardValue10.Selected.Value = "Production Floor & System", true, false)

    if selected form.gif
  • KV-09061058-0 Profile Picture
    12 on at

    Thanks @LaurensM and @Hasrie ,

    Both your answers helped. Mainly the explenation from LaurensM, but Hasrie, the true,false part is important too. Thanks a lot.

     

    I used this formula:

    If(DataCardValue1.Selected.Value = 'Pasta? (Polyester artikel)'.Ja;true;false)
    The text DataCardValue1.Selected.Value came from the side menu inside the editor; clicking on the datacard that is deciding if the other vield should be visible, then on the side menu clicking on advanced and scrolling down to Update field.
     
    Please note, my formula is set for my Dutch version. So i'm using ; instead of ,  and Ja in English is Yes

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 194 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 150

Last 30 days Overall leaderboard