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
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
I have tried this but it does not work
I
Patch(
'Listname',
LookUp('Listname'),{Status:{Value:"Yes"}});SubmitForm(SharePointForm1);
any help would be great.
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.
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! 😊
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! 🍻
WarrenBelz
146,660
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,004
Most Valuable Professional