Modifying Property Sheet data for a hierarchy of objects
The TreeSetPropData.pl is a sample Perl program delivered to the Contenta_home/encaps/Samples/Perl directory. It can be used to modify the data in a specified property sheet field for a hierarchy of objects.
Example:
Note that the Dynamic Import File Import feature does not have any assumptions about the Property Sheet of the data/objects it is importing therefore it does not populate any property sheet fields.
If you use File Import to import a hierarchy of objects and now want to add data to a property sheet field, use TreeSetPropData.pl to add the data.
The syntax is:
TreeSetPropData.pl -p path -pd “PropertySheetFieldName” -v value -s socketnum -n node -d database -u sysadmin -pw password
| Switch | Description |
|---|---|
-pd “PropertySheetFieldName” | “PropertySheetFieldName” is the name of the Property Sheet field to be modified. For example, to add data to the Document Type property sheet field, enter “Document Type”. The double-quotes are mandatory if the field name contains spaces. |
-v value | value is the data that is to be entered in the Property Sheet field. |
-s socketnum | socketnum is the PcmPortal number to use to connect tothe server. |
-n node | node is the Contenta Server nodename to which to connect. |
-d database | database is the name of the Contenta database to which to connect. |
-u sysadmin | Enter as shown, the user that connects and modifies the Property Sheet data must be the Contenta sysadmin user . |
-pw password | password is the sysadmin’s password. |
Example:
To add the data, wdoc to the Document Type property sheet field —for all objects under the container Recipes-WordData (noted in table above) —in the database cetrain —on the Contenta Server keeter —using the default PcmPortal 6050,
at a command prompt enter: TreeSetPropData.pl -p /#1/#2/#6/#7/#11 -pd “Document Type” -v wdoc -s 6050 -n keeter -d cetrain -u sysadmin -pw manager