I am attempting to update metadata fields on an item using the REST API. I am able to update metadata fields but any selections in multiselect fields are lost.
The example for "PUT: Replace workspace item" (http://help.autodesk.com/view/PLM/ENU/?guid=GUID-DCA5139F-6881-44D0-9699-0E9C834C2F2B) shows key/value pairs for fields. This works fine for various types including single select pick lists but I how do I send in multiple values for a multiselect field.
The GET returns a "selections" property in FieldData. How do I maintain what was already selected in the multiselect. Can the value in the key/value pair be an array of objects? I don't see a "selections" property on the field data in the PUT.
Thanks
Solved! Go to Solution.
Solved by SailinBenedum. Go to Solution.
When you post to an item that has a Multi-Select Linked Picklist (Referencing another workspace) or a picklist of Values, the "value" needs to be a comma separated list of ID's (DMSID for Linked Picklists).
Also keep in mind that you need to pass in all fields on a workspace or it will assume you're entering a null value.
'{ "versionID":0, "metaFields":{ "entry": [ {"key": "INSPECTION_TYPE", "value": "5"}, {"key": "INSPECTED_BY", "value": "1"}, {"key": "INSPECTED_ITEM", "value": "249"}, {"key": "SOME_LINKED_PICKLIST", "value": "1234,1235,1236"} ] } }'
Thanks Sailin. That did it. Perhaps Autodesk will update the documentation to include a CSV string.