Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

when i add to button to the form, i want the user to click it and it update the status field im tryng to patch it

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I am not using a gallery when i try to do this, I'm trying to keep it simple for this form. 

 

when a new item is added to the list an e-mail is sent to the user to approve it.  So i have added an approve button to the form. 

but you cant user it unless the form is in edit mode as i had to sit in form to get it to work

 

and this works 

help3_1-1701274751748.png

 

Patch(
Listname,
ThisItem,
{'Form Status': {Value: "Approved"}})

 

but i want this button outside the form to update the Status field with out it been in edit mode. but it does not work 

 

help3_0-1701274538315.png

 

I have tried this but it does not work 

Patch(
'Listname',
LookUp('Listname'),{Status:{Value:"Yes"}});SubmitForm(SharePointForm1);

 

any help would be great. 

 

 

Categories:
  • help3 Profile Picture
    on at
    Re: when i add to button to the form, i want the user to click it and it update the status field im tryng to patch it

    Hi

     

    The formula was accepted but when you click the button nothing happens,  the value in the in the Status column does not change, and also i don't get an error message its weird. 

     

     

  • MudassarSZ365 Profile Picture
    591 on at
    Re: when i add to button to the form, i want the user to click it and it update the status field im tryng to patch it

    Hi @help3 ,

    you can try this 

    Patch(
     ListName, 
     LookUp(ListName, ID = SharePointForm1.LastSubmit.ID), 
     {Status: {Value: "Approved"}}
    );

    If this resolves your issue, mark the solution and leave a thumbs up. Thank you! 😊

  • SpongYe Profile Picture
    5,580 Super User 2025 Season 1 on at
    Re: when i add to button to the form, i want the user to click it and it update the status field im tryng to patch it

    Hi @help3

     

    I checked your code and your second patch is missing something in the LookUp. 

     

    Patch(
     'Listname',
     LookUp('Listname'), // <-- your lookUp needs a record to Patch but has a whole datasource now
     {Status:{Value:"Yes"}}
    );
    SubmitForm(SharePointForm1);

     

     

    So it would like this:

     

    Patch(
     'Listname',
     LookUp('Listname', ID = SharePointForm1.LastSubmit.ID), // <-- looking for a specific record
     {Status:{Value:"Yes"}})
    )

     

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,660 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard