Change CDF data type
Jump to navigation
Jump to search
Common data type changes are:
- text to number
- text to single- or multiselect
- single-select to organisation
Of course the first action is to prepare/update the existing values in table cdfvalue so they are possible of changing data type of. E.g. if the change is from text to number than the decimal symbol need to be dot for all existing values.
- Update the column for the new value type in table cdfvalue e.g. column numbervalue.
- Update the column value_type to the new type and delete the value from the old column.
- Update the column fieldtype and display_mechanism in table field, see image below for valid combinations.
- Update the column cdf_datatype in table customdefinedfield.
- Depending on what change is done; insert or delete values from table allowed_value_set.
- Start the client.
- Open the DIM and check that all looks OK.
- Update all DEF templates.
- Switch templates.
- Delete the old templates from the database.
- Update Summary templates.
- Update iReports, SQL views, import scripts, etc.
The final check is to create a Staging area. The error message "There are duplicate normalized CDF Column Names, staging processing cannot continue" may also indicate that there are other problems with CDFs than the names.
|
Query for verifying fieldtype and display_mechanism
SELECT field. fieldtype, field.display_mechanism, customdefinedfield.cdf_datatype, Count(field.field_guid) FROM customdefinedfield Inner Join field ON field.cdf_guid = customdefinedfield.cdf_id GROUP BY field.fieldtype, field.display_mechanism, customdefinedfield.cdf_datatype ORDER BY field.fieldtype ASC, field.display_mechanism ASC, customdefinedfield.cdf_datatype ASC
