cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gennarodp
Post Patron
Post Patron

Update single record of a editform with a button

Hello,

i have an edit form that is related from a gallery (source sharepoint list)

 

when i select a single records of gallery, the app open a new screen with a editform linked with detailed datas of selected record.

 

i would like in this editform to update a single field with a button, that switch the value from ‘open’ to ‘closed’.

i have tried with function patch, but i have some errors.

 

thank you all

 

1 ACCEPTED SOLUTION

Accepted Solutions
eka24
Super User III
Super User III

If it a choice column:

Patch(Datasource,LookUp(Datasource,ID=Value(DataCardValue1.Text)),{StatusColumn:{Value:"Closed"}})

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

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.

View solution in original post

7 REPLIES 7
eka24
Super User III
Super User III

Consider this formula:

Patch(Datasource,LookUp(Datasource,ID=Value(DataCardValue1.Text)),{StatusColumn:"Closed"})

Note: Change ID to your unique column in your List

         Change DataCardValue1 to the Textbox on your form

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

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.

Some questions:

 

Id is unique Id of Sharepoint list ?

DataCardValue is a DataCard of what fields ?

StatusColumn is the column in wich is there open e closed status ?

 

Thank you

eka24
Super User III
Super User III

Id is unique Id of Sharepoint list ? YES

DataCardValue is a DataCard of what fields ? THE ID FIELD (Textbox) IN YOUR FORM

StatusColumn is the column in wich is there open e closed status ? YES

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

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.

ok, it doesnt' work.

the problem is that, the values "open" and "closed" are selected value, not simple text.

 

How can i resolve it ?

 

Thank you

eka24
Super User III
Super User III

If it a choice column:

Patch(Datasource,LookUp(Datasource,ID=Value(DataCardValue1.Text)),{StatusColumn:{Value:"Closed"}})

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

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.

View solution in original post

Thank you very much

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,874)