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 / On Click of a Approve ...
Power Apps
Unanswered

On Click of a Approve / reject button automatically update the date and time of the user

(0) ShareShare
ReportReport
Posted on by 138

Hello team,

My power app is based on an assigned form when a user clicks on the approve or reject button.

There are a few conditions that need to be applied to buttons : 

1)Before the user gives the approver comments the Approve/Reject Button should be in Disabled mode, When user gives an Approver comment (multi line text)..the buttons should get enabled.

2)On click of the approve / reject button --the status should get updated automatically --

3)After approving/rejecting the approve/reject button should get disabled.

4)The date and time of the user should get captured automatically.

I tried On Approve / Reject button : for status to get changed 

OnSelect property :

set(varstatus,"approved");

patch(submitlist,lookup(submitlist,ID=landingpage.Selected.ID),{Status:{Value:"Approved"}});Navigate(screen1);

where it works --the status gets changed 

 

2)On DisplayMode property :

If(IsBlank(lblApprovercomments),Edit,Disabled);

 

3)Date and time update?should capture the current user's automatic.

 

Can anyone help me .Any help very much appreciated.Thanks in advance

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    153,049 Most Valuable Professional on at

    Hi @Salesforce ,

    Try on your button DisplayMode (not sure on the data source here)

    If(
     landingpage.Selected.Status.Value = "Approved"
     DisplayMode.Disabled,
     DisplayMode.Edit
    )

    Your Patch

    Patch(
     submitlist,
     {ID:landingpage.Selected.ID}
     {
     Status: {Value:"Approved"},
     DateTimeField: Now()
     }
    )

     

    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.

    Visit my blog Practical Power Apps

  • Salesforce Profile Picture
    138 on at

    Hi @WarrenBelz ,

    Thanks for your help.The patch function is working and getting updated in the sharepoint.

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