cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
resolver101757
Helper I
Helper I

updating a document library meta data

Hi,

 

I have a power app connected to a document library with a choice field I want to update.  The choice field has 2 options "held" and "proceed".   I have a button that when pressed i want it to update the choice field to "proceed".   However, I cant get the syntax correct. On the buttons "on select" i enter: 

 

Patch(purchase_invoices,Gallery1.Selected.ID,{'On hold':{Value:"proceed"})

 

 but it says the syntax is not correct.  What is the correct syntax?  

Purchase_invoice is the document library 

Gallery1.Selected.ID is the select id in the gallery from the document library

{'On hold':{Value:"proceed"} is the field and the value im setting it to is proceed 

 

 

On hold field : 

resolver101757_0-1631961969894.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @resolver101757 ,

You were close

Patch(
   purchase_invoices,
   {ID:Gallery1.Selected.ID},
   {
      'On hold':
      {Value:"proceed"}
   }
)

 

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.

View solution in original post

9 REPLIES 9
WarrenBelz
Super User
Super User

Hi @resolver101757 ,

You were close

Patch(
   purchase_invoices,
   {ID:Gallery1.Selected.ID},
   {
      'On hold':
      {Value:"proceed"}
   }
)

 

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.

View solution in original post

Many thanks 🙂 That gets passed that error.  However, I'm now getting another error when running the power app as command shown below.  Any ideas whats wrong here?   

 

 

"The specified record was not found. Server Response: purchase_invoices failed: Item Not Found clientRequestld: 78d8e5d9-faad-4081-ac92-55616b66e566 service Requestld: 78d8e5d9-faad-4081-ac92-55616b66e566

 

resolver101757_0-1631968406371.png

 

Hi @resolver101757 ,

Assuming the following:-

  • Your data source is a SharePoint Library named TBL_purchase_invoices
  • The Items of Gallery1 are based on this Library
  • You have a Choice field called 'On hold' in this Library
  • You want to update this Choice field on the record selected in Gallery1 to the value "proceed"

then the syntax is correct. Is any of the above not accurate?

 

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.

Yeah thats all correct, However, I just want to clarify the last bullet point.  The choice field exist in the TBL_purchase_invoices document library.  The item selected in Gallery1 is the item I want to update in the document library TBL_purchase_invoices with the value "proceed".  Is this correct? 

@resolver101757 ,

You want to update the Choice field 'On hold' on the record selected in Gallery1 in the Library TBL_purchase_invoices to the value "proceed", then yes, it should do that with the syntax posted.

I wonder why its not then....Could it be the ID number number isnt picking up the right record??? Whats the best way to troubleshoot this type of problem?

@resolver101757 ,

What are the the Items of the Gallery?

WarrenBelz
Super User
Super User

Hi @resolver101757 ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

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.

thanks for asking 🙂  not yet, ill get back to you later this week..  I've had a busy week

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Users online (1,564)