In reply to: Wojciech Paluch
Hi,
I also tried using this endpoint /api/data/v5.0/db/{db}/elements/resolveFieldValue/{guid} in Postman to get all available positions in the picker.
From the swagger information, this is a POST request. I have set all the necessary fields, authorization in the header, workflow ID, form field ID and field ID in the url. After sending this request I get an error "Model is not valid. A non-empty request body is required.". Do you know why this is happening or what I should write in the POST content?
Hi,
Indeed I did a mistake at that time, I did not choose POST as API request type, I can't say why...
In my case, data source for picker is a dictionary which provides data structure as follows: WFD_GUID as ID, WFD_AttText1 as Name.
Running a POST against the API:
{{base-URI}}/{{api-v4.0}}/elements/resolveFieldValue/{{picker-id}}?workflow=6&formType=7
with an almost empty body, containing only {} - opening and closing curly brackets, returns the options list, data and structure:
{
"data": [
{
"wfD_Guid": "51539292-4406-4c68-922e-b0c76f0f19f5",
"wfD_AttText1": "10 days"
},
{
"wfD_Guid": "0664bcf7-6e4e-4058-b08c-60ffcda432fa",
"wfD_AttText1": "100 days"
}
],
"columns": [
{
"sourceColumnName": "WFD_Guid",
"displayName": "ID",
"type": "Id"
},
{
"sourceColumnName": "WFD_AttText1",
"displayName": "Name",
"type": "Name"
}
]
}
Content-type header must be application/json, as set by Postman.
Hope it works for you,
Mihail