As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
Hi,
I would like to add string into a property defined into a document type without new operation definition.
We can't easily add the item as:
Thanks
The following solution is not the most maintainable one (it uses prefixed java classes, even if it is quite stable packages)but works and is 100% Studio
Here is how I did it:
I get the document that stores the list
parameters:
name: listOfSringTmp Value: @{new java.util.ArrayList()}
Temporary variable where the list of all elements will be stored.
script: java.util.Collections.addAll(Context["listOfSringTmp"], Document.getProperty("mySchema:myField"))
We add values stored into your document
script: Context["listOfSringTmp"].add("MyNewValue")
And we add the new value
script: Document.doc.setPropertyValue("mySchema:myField", Context["listOfSringTmp"].toArray())
And we set back the list into the document
I save my modification.