Updated: Mar 25, 2021
Once a field has been defined for one of your tables in CatBase, you can change any of its properties EXCEPT the field type.
So what can you do if you need to change a field type? Fortunately it's not too difficult. Just follow these steps:
If you want to keep the same field name for the new field, you will first need to rename the existing field, as you can't have two fields with exactly the same name in the same table. So rename it something like myfieldOld.
Create a new field with the type and name that you need. For example, suppose you need to replace a numeric field with a Text field. Create a new field, choose the Field Type Text, and enter the desired field name.
Save your new field.
Now you need to copy the contents of the old field to the new one. This is easily accomplished with the Search & Replace function:
Go to the list view of the table that the field belongs to.
Find the records that you want to change - if it's all of them, click the Show All button.
Click the Search/Replace button.
In the Search & Replace dialogue:
From the Search Field dropdown, choose the OLD field
In the Change From area, select the All Records radio button
In the Change To area, select the COPY contents TO field radio button.
In the dropdown next to that radio button, select the NEW field
Review your selections to make sure you've got them right!
Click the OK button.
Confirm that you want to change all the records by clicking Yes in the Confirm dialogue, or chicken out by clicking No.
The data will be copied from the old field to the new one.
If the new field is of a completely different type, the data will be converted as necessary. For example, if the old field is a Text type and the new field is a Date type, CatBase will do its best to convert the data into proper dates.
Now you just have a bit of cleaning up to do ...
Change any references to the old field in your Import Styles, if necessary:
Go to the Import Style.
Click in the column header that displays the old field name and select the new field from the dropdown.
Change any references to the old field in your Publishing Styles, if necessary:
Go to the Publishing Stylesheet.
Open the Element in which the old field is referenced.
Select the new field.
Replace the old field on your data entry form:
Go to Admin->Table and Field Setup->Form Design Wizard.
Delete the old field.
Place the new field on the form.
If the old field is included in the list view for the table:
Go to the list view for that table.
Right-click on the column heading for the old field and choose Delete Column.
Right-click anywhere within the list area and choose Add a column.
Select the new field.
Adjust the width and placement of the new column, if necessary.
Right-click on the list and choose Save the column settings for this view.
Now you can go back to the table setup (Admin->Table and Field Setup) and delete the old field. You won't be able to delete it if it's still being used somewhere - eg in an Import Style or Publishing Stylesheet!
Further Reading ...
To learn more about adding and managing fields, see the Field Properties tutorial.
Learn more about Import Stylesheets.
Find out more about the Form Design Wizard