Changing property type
Changing property type from Text to Date
To change the property type, do the following:
-
Open the Property definitions, select a specific property and change its data type using the Edit command. Property values that are specified in one of the supported formats are automatically converted to the date type. Because the system is not guaranteed to automatically convert all property values in the entire record, a backup (copy) of the original property is automatically created with the name
<property name> (old)
(e.g. "Date of manufacture (old)"), which will retain the original values.noteThe supported format for automatic conversion is
dd.mm.yyyy
(e.g. 15.10.2015, 3.1.2015). If you have most of the property values entered in a different format, we recommend following up to step 5 in this guide. -
Check that the system was able to convert all the values by following this procedure:
- Go to the Objects page and switch it to the Table mode.
- View the
<property name>
column (Date property type) and<property name> (old)
column. - Set the column filters as follows:
<property name>
=""
<property name> (old)
=not ""
-
If no rows are displayed after setting the filter, all values have been converted correctly so continue with step 7.
-
If the system failed to convert a small number of values, manually add the values.
-
If the system failed to convert a large number of values, follow the following instructions for bulk conversion:
- Show only the "NodeId", "Type" and
<property name> (old)
columns. - Use the Analyze in MS Excel Sheet command to export the table.
- Open the file in Microsoft Excel and, if necessary, edit the original property values (i.e., the values in the "... (old)" column, e.g., "Date of manufacture (old)") so that they are all in the uniform format supported by the ImportUtil utility, see the -datetimeformat parameter of the ImportUtil. Then rename the column with the original values to the name of the target property (i.e., remove the "(old)" suffix).
- Save the file in CSV format.
- Update the property values in the registry using Import CSV command (or the ImportUtil, alternatively) specifying the -datetimeformat and -keyfields "NodeId" parameters. If the data import fails for some objects, manually edit the data format for the objects in the CSV file.
- Show only the "NodeId", "Type" and
-
Go back to the step 2.
-
After the conversion of property values is complete, remove the
<property name> (old)
property for all object templates and remove also the its property definition.
Changing property type from Text to Number
To change the property type, do the following:
- Change the data type of the Text property to Number. The supported format for conversion is a decimal number with a comma or period as the decimal separator. A space character can be used as a line separator. Negative numbers or numbers in abbreviated format can also be converted. For example: "12 543.50", "980.56", "-1530", "1,3e-2".
- After conversion, check and import any unconverted properties as described when changing the Text type to Date type.