Bulk Updates in FileNet using FEM
Bulk updates are used in FileNet when there is a requirement to update a property of a large number of documents with the similar data. Suppose there is a requirement to update Document Type property of a particular document class as the document type values are revisited and updated, in this case, we can use the bulk update to update the document type property of the documents to a specified value.Bulk update functionality is performed using FEM(FileNet Enterprise Manager) and either VBScript or JScript is used as a scripting language. In the FEM search window using the script tab we can execute this bulk update. In the script, tab check the Execute Script check box to enable the script area
to perform the property update use the below VBScript code
CEObject.properties.item("DocumentType").vlaue = "NewDocuemntType"
CEObject.saveThe above code is good at updating the single value properties but to update the multi-value properties we need to modify the code as below
CEObject.properties.item("multivaluePropertyName").value.add("newPropertyValue")
CEObject.properties.item("multivaluePropertyName").value.remove("oldPropertyValue") CEObject.save
Thank you, very useful.
ReplyDeleteValue field probably supports other useful Java List and Collection methods (clear, contain, etc.).
Here's a code snippet to remove all values of a multi value field (mvf):
ReplyDeletePublic Sub OnCustomProcess (CEObject)
Dim list
Set list = CEObject.properties.item("KVV_NR").value
While list.count > 0
list.remove list.count,1
Wend
CEObject.save
End Sub
and another one to remove the value of a single value field:
ReplyDeletePublic Sub OnCustomProcess (CEObject)
CEObject.somePropertyName = Nothing
CEObject.Save
End Sub
What about changing a document class?
ReplyDeleteHi Venkata
ReplyDeleteThanks for the post. I understand by going to the Script Tab of Search Screen of FEM we can write scripts to do bulk updates of document metadata. But how to add an "end user" Interface so that end user can just type in new property value of a single value propert and hit submit and that would update all the documents that have been searched up. In other words how to customize the search screen to add more functionality to it.
What about changing a document class?
ReplyDeletehow to delete an document object and its related objects
ReplyDeleteImprovement in the updation of blogs have made easy to know about the FileNet support and also implementation at times.
ReplyDelete