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

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

Top Solution Authors
Top Kudoed Authors
Users online (2,942)