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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Conditional visibility...
Power Apps
Unanswered

Conditional visibility in edit form

(0) ShareShare
ReportReport
Posted on by 16

I would like to show/hide input fields based on the value of a lookup in an edit form. I have successfully implemented an IF function in the visible property on a view form that works. However, I need to have the show/hide feature refresh after changing the value in the lookup.

 

Is there a function that will redraw the form based on the current record once the value in the lookup changes? Or another way to implement this behaviour?

Categories:
I have the same question (0)
  • Brian Dang Profile Picture
    3,976 on at

     

    If I understand this--you want a LookUp in an Edit Form to affect what fields are shown in the resulting View Form.

     

    1. Edit Screen: Save a context variable based on the LookUp in the Edit Form.
      UpdateContext({var1: yourvaluehere})
    2. Edit Screen: Setup the Edit Form's OnSuccess property to Navigate to the Screen with your View Form and send the context variable from step 1.
      Navigate(Screen2,Fade,{var1: var1})
    3. View Screen: Setup the Visible property of the desired field in the View Form to a condition based on the context variable that was passed in step 2. Be sure to select the field itself and not objects within the field. This makes a difference. The example below shows nested IFs assuming your LookUp returns 1,2,3...
      DataCard1Value.Visible:
      
      If(variable=1, [true/false],
      variable=2, [true/false],
      variable=3, [true/false]
      )

    How this works: prior to submitting your form on the Edit Form screen, the LookUp will be saved in a variable. The app will go to the screen with View Form. Based on the variable, it will show/hide certain fields as you have set.

  • benshaw Profile Picture
    16 on at

    Hi mr-dang

     

    Thank you very much for your response. That is almost what I want, but I want the LookUp in the Edit Form to affect what fields are shown later in that same Edit Form. Is there a way to update the Edit Form dynamically as the LookUp value is changed that you know of?

     

    Thanks

    Ben

  • Verified answer
    Meneghino Profile Picture
    6,949 on at

    Hi benshaw, you need to set the Visible property of your datacard to something like: Dropdown1.Selected.Value = "XXX"

    Where Dropdown1 is your dropdown and "XXX" is the value that should make the datacard visible.  You can use && and || to build up the expression.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard