Skip Navigation LinksALVAO 8.2ALVAO Asset ManagementSystem Implementation in an OrganizationChanging the Text Type Property to Date Type Property
Skip Navigation Links.
Skip Navigation Links
Skip Navigation Links.
%USERPROFILE%\Documents\ALVAO\Doc\Documentation\doc\en\alvao_8_2\alvao_asset_management\implementation\object_property_change_type.aspx
|
Changing the Text Type Property to Date Type Property
To change the properties type follow these steps:
- 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.
Note: There are two formats supported for
automatic conversion: "yyyy.dd.mm" (e.g. 2015.15.10, 2015.3.1) or "dd.mm.yyyy"
(e.g. 15.10.2015, 3.1.2015). If you have a majority of property values
entered in other format, we recommend to follow this instructions
starting only from step 5.
- Check, whether the system managed to convert all the values according to
the following steps:
- Select the whole organization in the objects tree.
- 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.
- 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:
- "<property name>"=""
- "<property name> (old)"=not ""
- "Path in the tree" – remove the filter (the objects from all
the registry are displayed then)
- If no rows are displayed after setting the filter, all the values have
been converted correctly, and then continue with the step 7.
- 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.
- If the system didn't manage to convert big number of values, follow the
steps for batch conversion below:
- Display only the "NodeId", "Kind", and "<property name> (old)" columns
in the table in the Lists of objects window.
- In the context menu select Table -> Save as and save the table as
"*.CSV" file.
- 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).
- 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.
- Continue again with the step 2.
- After finishing the property values conversion, delete the "<property
name> (old)" property from all the templates and perform the unification
according to the templates:
- Open the Tools – Database – SQL query window.
- Create a new query (File – New).
- 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)'
- In the query change the '<property name> (old)' string to the name of
your old property.
- Gradually find all the found object templates according to the path in
the tree and delete the old property from them.
- Perform the objects unification according to the templates being edited.
- Using the "Lists – Property definitions" delete the property definition.
- 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.
Did not find what you were looking for? Ask our technical support team.
|