Skip Navigation LinksALVAO 10.2ALVAO Asset ManagementSystem Implementation in an OrganizationChanging the Text Type Property to Another Type Skip Navigation Links. Skip Navigation Links Skip Navigation Links.


Changing the Text Type Property to Another Type

Changing the Text Type Property to Date Type Property

To change the properties type follow these steps:

  1. Open the Property definition window, select a specific property and change its data type. The property values entered in one of the supported formats will be converted to date type automatically. Because it is not guaranteed the system can convert all the property values in the whole registry automatically, a backup (copy) of original property named "<Property name> (old)" (e.g. "Production date (old)") and containing the original values will be created automatically.
  2. Note:
    The supported format for automatic conversion is "dd.mm.yyyy" (e.g. 15.10.2015, 3.1.2015). If a majority of property values has been entered in another format, we recommend you to skip to step 5.
  3. Check, whether the system managed to convert all the values according to the following steps:
    1. Select the whole organization in the objects tree.
    2. On the Objects tab view the "<property name>" (Date type property) and "<property name> (old)" columns. Use the View in the lists of objects command from the context menu.
    3. As soon as the "Lists of objects" window displays, confirm the view name by pressing the "Enter" key and set the filters in columns using the following steps:
      1. "<property name>"=""
      2. "<property name> (old)"=not ""
      3. "Path in the tree" – remove the filter (the objects from all the registry are displayed then)
  4. If no rows are displayed after setting the filter, all the values have been converted correctly, and then continue with the step 7.
  5. If the system didn't manage to convert a small number of values, fill those values in manually. We recommend to order the values on the Objects tab by the "<property name> (old)" column and to set the object property values in the "<property name>" using the "Edit" command from the context menu. In this way you can set the same property value for multiple objects at once.
  6. If the system didn't manage to convert big number of values, follow the steps for batch conversion below:
    1. Display only the "NodeId", "Kind", and "<property name> (old)" columns in the table in the Lists of objects window.
    2. In the context menu select Table -> Save as and save the table as "*.CSV" file.
    3. Open the file in Microsoft Excel and edit the original properties (i.e. values in the "… (old)" column, e.g. "Production date (old)") eventually so they all are in unified format supported by ImportUtil utility, see -datetimeformat parameter of the ImportUtil utility. Then rename the original values column to the target property name (i.e. delete the "(old)" suffix).
    4. Using the ImportUtil and the -datetimeformat and -keyfields "NodeId" parametrs, perform the update of property values in the registry. If the data import for some object is not performed, edit the date format for such objects manually in the CSV file.
  7. Continue again with the step 2.
  8. After finishing the property values conversion, delete the "<property name> (old)" property from all the templates and perform the unification according to the templates:
    1. Open the Tools – Database – SQL query window.
    2. Create a new query (File – New).
    3. Enter the following SQL query:
      SELECT DISTINCT n.intNodeId, n.txtClass [Object kind], n.txtPath+N'/'+n.txtName [Path and object name in the tree] FROM vNodeClass n JOIN tblNodeParent np on np.lintNodeId=n.intNodeId JOIN tblNode t on t.intNodeId=np.lintParentNodeId and t.lintClassId=3 JOIN vPropertyKind pk ON n.intNodeId=pk.lintNodeId AND pk.txtKind=N'<property name> (old)'
    4. In the query change the '<property name> (old)' string to the name of your old property.
    5. Gradually find all the found object templates according to the path in the tree and delete the old property from them.
    6. Perform the objects unification according to the templates being edited.
    7. Using the "Lists – Property definitions" delete the property definition.
    8. If you are not able to delete the property definition after that, it is apparently used for objects not having a template. You can find them using the query:
      SELECT n.intNodeId, n.txtClass [Object kind], n.txtPath+N'/'+n.txtName [Path and object name in the tree] FROM vNodeClass n join vPropertyKind pk ON n.intNodeId=pk.lintNodeId and pk.txtKind=N'<property name> (old)'
      The query can be run again from the Tools – Database – SQL query window. Don't forget to change the property name in the requests. Delete all the properties found this way and remove the property definition again.

Changing the Text Type Property to Number Type Property

To change the properties type follow these steps:

  1. Change the Text property type to Number. The supported format for conversion is a decimal number with a comma or a period as a separator for decimals. A space can be used to separate thousands. Negative numbers or numbers in shortened form can also be used. E.g.: "12 543,50", "980.56", "-1530", "1,3e-2".
  2. After finishing the conversion, check for any properties not converted and import them if necessary as described for the Text to Date type conversions.
    Note:
    If ImportUtil is used, you don't need to use the -datetimeformat radio button.
Notification: Date type properties cannot be changed to Number (or vice versa). Moreover, data types cannot be changed for system items.   

 

Did not find what you were looking for? Ask our technical support team.