08-26-2011 03:15 PM
Another query, as we're moving documents from one system to another, we need to set up lots of metadatas when a document gets uploaded/updated. According to the PHP Automation client, I believe I can set a single property (such as dc:title or dc:description) at a time by running following command...
$answer = $session->newRequest("Document.SetProperty")->set('input', 'doc:' . $path)->set('params', 'value', "New Title")->set('params', 'xpath', "dc:title")->sendRequest();
But the problem is that I need to run above command for every single property. So if I'm setting up 8 different properties for a document, I need to run the above command 8 times.
Is it possible to pass an associative array that sets up all the necessary properties in one go?
02-26-2013 05:03 AM
I belive that's what the 'Document.Update' request is for :
$session->newRequest("Document.Update") ->set('input', 'doc:' . $newPath) ->set('params', 'properties', "dc:title=The Document Title dc:description=foo bar") ->sendRequest();
in this example it set the title and the description at once. ( note that the new line between the two properties is important )
02-26-2013 05:04 AM
LOL -> the forum doesn't show new lines so you don't see it, but there should be one 😉
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.