Nov 08 2022 01:56 PM
Nov 08 2022 01:56 PM
I test a GET query to have access at the label of 2 metadata fields associate to a content type use to upload files in document set folder. I need to have information from somes fields of the docset too.
For testing I use Postman and ie11 to view the result in XML.
I have create a 2013 workflow with a http web service call who check in the folder and give the number of files who are present in the folder and the name and the title of each files.
Now I need to catch the metadata column value. So I have change my URL to this one.
http://sharepointURL/sites/cdr/_api/Web/GetFolderByServerRelativeUrl('/sites/cdr/Reclamation/001 - Test de réclamation')/Files $Select=Title,Name,ListItemAllFields/RubriqueReclamation/Label,ListItemAllFields/NoDossier&$expand=ListItemAllFields/RubriqueReclamation/Label,ListItemAllFields/NoDossier
Like you could view I use the $EXPAND key and ListItemAllFields to catch value of the folder and the files. If I dont put the &EXPAND and ListItemAllFields I could just catch the name and the title of the files.
When I run the URL query in postman or ie11 to test. It work and return the good fields like results.
But in my workflow, If I change my URL in my HTTP service web, the workflow hang and say than one invalid value for a text field is present.
I would like put each red value below in a separate string var in my 2013 Workflow.
Yes I use SharePoint Designer 2013 to make my workflow. I'm in Sharepoint 2016 on premise.
If I change my URL for
http://sharepointURL/sites/cdr/_api/Web/GetFolderByServerRelativeUrl('/sites/cdr/Reclamation/001 - Test de réclamation')/Files $Select=Title,Name
I make a d/results/Title and a d/results/Name and the right value is put in my var string.
I have try many versions of d/results to read the value of the fields without success.
Ex: d/results/(index value)/ListItemAllFields/RubriqueReclamation/Label
Depend of the URL in the HTTP call, I have 2 results.
1. I dont have any errors, but all string associate to the expand value stay empty.
2. I have the error of bad string and the workflow stuck.
If I change the URL for the more simple to catch only Title and Name without the Expand value, the workflow work without error, detect the number of files in the folder and give me the name and the title of each files and the other string stay empty like I dont catch the Expand value.
Any hints or example is welcome.
Nov 17 2022 05:49 AM