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 / Onselect If Function E...
Power Apps
Answered

Onselect If Function EditScreen

(0) ShareShare
ReportReport
Posted on by

Hello,

 

I have a power apps from a Sharepoint form that i would like to edit in EditScreen1.  The form has a field "List" with three options(A,B,C). I have been trying in the option OnSelect to change When select "A" the form hide the fields that belongs to B and C. Â¿Is it possible do this?

SergioMoreno_0-1640561558102.png

Could any body please help ?

Thank you

 

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,717 Most Valuable Professional on at

    You are probably trying to change the visible property directly in the OnSelect.  You can't do it that way because Power Apps is declarative, not procedural.  What you can do is set a variable value in the OnSelect.  Then in the Visible property of each field use an IF() to set the Visible to true or false based on the value.  Something like this

    onSelect
    Set(optionPicked, option.selected.value)
    
    In A visible property
    If(optionPicked = "A",true,false)

     

  • Community Power Platform Member Profile Picture
    on at

    I have another question,

    If I apply this solution, when an user tries to fill the form and select list "A", Fields that do not correspond to list A are hidden?

    Thank You

  • Verified answer
    Pstork1 Profile Picture
    68,717 Most Valuable Professional on at

    YOu have to put code similar to the code you put in the Visible property of the A Fields in all the fields that should appear or disappear.  The only thing that would change for the other fields is the value being tested, "B" or "C".

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard