Skip to main content
Community site session details

Community site session details

Session Id : cozMImXDeDiMQEXuSWS1mc
Power Apps - Building Power Apps
Unanswered

Edit button is not display properly in user screen and admin screen

Like (0) ShareShare
ReportReport
Posted on 13 Jun 2021 09:30:44 by

Hello, i have developed a power apps similar to Help desk app to submit the issue by requesters and admin team to work on that.

 

AJ_vizMan_0-1623576547301.png

 

I need to enable the 'edit' button for non-admin(s) when ticket status is either 'New' or 'Pending' else it should be disabled. In case of admin person login in app, 'edit' button should be enabled for either 'New', 'Assigned', 'In Progress' or 'Pending' status and for other cases, it should be disabled.

I am using below expression in 'Display Mode' to achieve above functionality but, it's behavior is not consistent, sometimes it work fine and sometime it doesn't.

 

If(!isAdmin && (SelectedTicket.TaskStatus.Value = "New" || SelectedTicket.TaskStatus.Value = "Pending") , DisplayMode.Edit, If(!isAdmin && (SelectedTicket.TaskStatus.Value = "Rejected" || SelectedTicket.TaskStatus.Value = "In Progress" || SelectedTicket.TaskStatus.Value = "Resolved" || SelectedTicket.TaskStatus.Value = "Assigned") , DisplayMode.Disabled, If(isAdmin && (SelectedTicket.TaskStatus.Value = "Assigned" || SelectedTicket.TaskStatus.Value = "In Progress" || SelectedTicket.TaskStatus.Value = "Pending" ) , DisplayMode.Edit, If(isAdmin && (SelectedTicket.TaskStatus.Value = "Resolved" || SelectedTicket.TaskStatus.Value = "Rejected") ,DisplayMode.Disabled))))

 

Please suggest why the 'edit' button is behaving randomly.

 

  • WarrenBelz Profile Picture
    148,876 Most Valuable Professional on 19 Jun 2021 at 00:01:35
    Re: Edit button is not display properly in user screen and admin screen

    Hi @AJ_vizMan ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • WarrenBelz Profile Picture
    148,876 Most Valuable Professional on 13 Jun 2021 at 10:58:42
    Re: Edit button is not display properly in user screen and admin screen

    Hi @AJ_vizMan,

    I have consolidated the code a bit below - note at the end I have allowed for the button to be disabled if none of the condition combinations are true. Please note this is free-typed and meant to be syntax guidance only.

    With(
     {wStatus:SelectedTicket.TaskStatus.Value},
     If(
     wStatus = "Pending" && 
     (!isAdmin && wStatus = "New") ||
     (
     IsAdmin && 
     (wStatus = "Assigned" || wStatus = "In Progress)
     ),
     DisplayMode.Edit, 
     wStatus = "Resolved" &&
     (
     !isAdmin && 
     (wStatus = "Rejected" || wStatus = "In Progress" || wStatus = "Assigned")
     ) ||
     (isAdmin && wStatus = "Rejected"),
     DisplayMode.Disabled,
     DisplayMode.Disabled
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it 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

Loading complete