How can I change a Field Type?
Field Types cannot be changed once a new Field has been saved.
The solution is to create a new field of the required type, copy all the data over form the original field to the new one, and then delete the old one. Here are step-by-step instructions:
Let's say you have created a String field called Info. Later you realise that you really needed it to be a Text field.
- Create a new field, choose the Text field type, and name it something like Info2, and save it.
- Make sure that you have only one CatBase window open. If you are using CatBase Multi-User, it is best to ask all other users to log off while you complete this task. This is because if somebody has one of the records open, CatBase won't be able to copy the data to the new field for that record, as it will be locked.
- Go to the data table and view all the records in that table.
- Click the Search/Replace button at the top of the data list.
- In the Search Field: popup, select the ORIGINAL field (e.g. "Info")
- In the Change From: area, select All records or maybe Is not blank.
- In the Change To: area, select the MOVE contents to field: radio button. Or, if you want to keep the original field data as well as copying it to the new field, choose the COPY contents TO field: radio button.
- Select the field that you want to move or copy the data TO from the popup list of fields in the Change To: area (e.g. in our example, you'd choose the Info2 field)..
- Click OK.
- Go ahead and approve the change.
When the data has finished copying ...
- Check that the data has all copied over to the new field.
- Go to the Form Design Wizard, delete the old field, and replace it with the new one.
- Likewise, if appropriate, delete the old field from the List View and replace it with the new one.
- If the old field has been used in any Import Styles, open them up and re-select the new field in place of the old one.
- If the old field has been used in any Publishing Stylesheets, open them up and re-select the new field in place of the old one.
- You should now be able to delete the old field.