Every Field Definition in ADAM has a 'Scope' property. The scope determines when
and to which objects the Field will be added. E.g. Field on a record (global, floating,
..), Field on a file, ...
The scope of a Field is set when creating the Field Definition, and cannot be changed
afterwards. This means that, whenever you want to change the scope of a certain
Field, you have to create a new Field Definition with the right scope and then migrate
the field value(s) from the old Field to the new one.
Imagine you need to update the Scope from 'Record Content - Class Dependent' to
'Record Content - Global'. Let's explain the neccesary steps to accomplish this.
- Create a new Field definition in ConfigStudio and give it the right Scope (e.g.
Global). Do not forget to fill in the other desired profile properties.
- In
the 'Advanced Properties' tab, we'll use a reference that will 'copy' the value
from the old field to the new one.
- When using a Date, DateTime, Duration, Numeric, Text, and Time Fields, you can
create a default value containing a record reference:
e.g. <ref:record fieldName="oldfield"/>.
- In case you are transfering a Dynamic Option List, Option List, User Group or
User Field, create a default value that uses a code reference:
e.g. <ref:code><![CDATA[ return
adamRecord.Fields.GetField<UserListField>("oldfield").ToString(); ]]></ref:code>.
- When you want to update a RecordLink field, you can create a validation routine
containing a code reference. End your routine with
return true;.
More detailed information about default field values is available in ADAM Help,
in 'Admin Guide > Basic Configuration > Fields > Advanced Field Properties'.
- Add every record you want to update to a basket and create a record maintenance
job. Add the “Resave record” maintenance action.
- Submit and run this maintenancejob.
- When the job ends successfully (this can take some time depending on the number
of records that were added) you can check some records to make sure that the field
value was transferred correctly.
- When this is the case delete the default
value from your new field definition.
- You can now delete the old field definition
in ConfigStudio. Only do this when you are 100% sure that the previous steps were
successful!
Note: This method cannot be used when converting to a 'floating' field.