3

I'm currently working on an automation project that uses Sharepoint to store invoices. I have used the Sharepoint package for UiPath to do the uploading; now, I'm trying to set a column/metadata value for an already uploaded PDF in Sharepoint. To do this, I am using the 'Update list item' activity that takes a dictionary of the metadata to update and a CAML query string that it uses to search for the item (I am using the invoice number as a reference). However, it's not working; no error, it just simply doesn't update anything.

Is there a mistake in my setup of this activity (see screenshot below) or is it just not possible to use this activity to update Sharepoint metadata? If I can't use this activity, how would I build an HTTP request to achieve this / is an HTTP Request activity the best way to go?

I should note that the PDFs I'm trying to update are stored within folders which have the structure /SupplierInvoice/<SupplierName>/<Year>/<Month>/<invoice>.pdf

Screenshot of UiPath activity setup

Conor
  • 736
  • 1
  • 13
  • 33
Alex Leach
  • 118
  • 7
  • Check if your query is correct and whether it returns an item. A suggestion, rather than writing the query in the editor with escape characters, try to read it from a file and add some place holders to replace with parameter values during runtime. – Kannan Suresh Jul 03 '20 at 09:53

1 Answers1

0

The problem is that the string delimitators are messing with your query, you should use Chr(34) to simulate the substrings. Using this will most likely solve your problem as it did to me:

In this case I'm updating those that match the "Title" column in Sharepoint (that is a Text Type) with "your_variant_value" that is a a variable string

" <FieldRef Name="+Chr(34)+"Title"+Chr(34)+"/><Value Type="+Chr(34)+"Text"+Chr(34)+">"+your_variable_value+" "

julesrif
  • 61
  • 1
  • 3