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 / Buttons not working in...
Power Apps
Answered

Buttons not working in View mode

(1) ShareShare
ReportReport
Posted on by 137

I have a sharepoint list that i have modified the forms in PowerApps.  This has allowed me to add 4 buttons to the top of the form which show and hide different fields when clicked (this breaks up the fields into different 'pages').  When a button is clicked it sets a variable which each field looks at to see if it is visible or not.

 

The issue is that when viewing the data (not new form or edit form) the buttons do nothing!  I presume they are somehow disabled from the OnView, but i cant work out how or how to change it!.

 

Any help greatly appreciated 🙂

 

 

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,925 on at

    You are not supposed to change a field if in view mode. But can you show a screenshot of the formula on the displaymode of the button?

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

    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.

  • StevieC Profile Picture
    137 on at

    Hi

    The DisplayMode of the button (main button) has this (this disables the button when pressed):

    If(varTab = "main", Disabled, Edit)

     

    and the OnSelect (this sets the varTab variable):

    Set(varTab, "main")

     

    The fields have this on their Visible (this displays the field if the relevant button has been pressed (is disabled):

    Btn_main.DisplayMode = DisplayMode.Disabled

     

  • eka24 Profile Picture
    20,925 on at

    Change the DisplayMode of the button to:

     

    If(varTab = "main",&&FormName.Mode<>View, Disabled, Edit)

     

    Change the FormName to your actual form name

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

    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.

  • StevieC Profile Picture
    137 on at

    That doesnt work - not sure what you are trying there, but essentially you are saying if the form is in view mode the buttons will always be in Edit mode?

  • eka24 Profile Picture
    20,925 on at

    Yes.

    If I misunderstood you kindly restate your point

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

    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.

  • StevieC Profile Picture
    137 on at

    ok to explain further.  I have a sharepoint list that has 40 columns.  To make the form easier to fill in and use, i have split those 40 fields up into 4 different sections.  Each field is displayed according to if the relevant button is selected (the selected button becomes disabled and the visible state of each field is set according to the buttons disabled state).

     

    e.g. user presses ButtonA, this disables ButtonA (no need to press it again!) and any form field that has its Visible set to true if ButtonA is disabled becomes visible.  This all works fine when editing a row or adding a new row.  Every time a user presses a button, that button disables, all the other buttons enable and the relevant fields hide or show.

     

    The issue is, when viewing the form in View mode (ie the user just clicks to view the item) these button do nothing - they dont even show the finger icon when hovered over. This means they can nolonger view all the data as some is hidden and the buttons dont do anything.

  • eka24 Profile Picture
    20,925 on at

    I think what is needed is a variable to reverse Set(varTab, "show") in order to show the fields and change the button mode.

     

    I suggest you change the variable to Boolean, true false.

    Set(varTab, false)

     

    Insert another that changes the variable

    Set(varTab, true); ViewForm (YourForm)

     

    Then DisplayMode of the button ;

    If(varTab =true, Disabled, Edit)

     

    With that when the new button is pressed, the field would show for View mode

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

    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.

     

  • Verified answer
    StevieC Profile Picture
    137 on at

    sussed it!!!

     

    I put the buttons in the form, all i had to do was move them out of the form to the page and it all works 🙂

     

    Thanks for all your input though!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Just change the card's Display Mode to Edit, the button/icon becomes clickable.

  • Steveertery Profile Picture
    41 on at

    Tried that and it doesnt - i have set both the card and the buttons to edit and it still doesnt work unless the form is in edit mode

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 379 Most Valuable Professional

#2
11manish Profile Picture

11manish 203 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard