Once a field has been created in a table, is there a way to change its name via a script ? I am not talking about changing the value of the field but changing its very name.
Another relevant technique is to use a virtual list and create the first row as a header.
That would be nice, isn't it ! But there is no way to modify tables in a script. Maybe through the API, but I am not sure.
There is Alter Table via ODBC/JDBC (as well as possibly with plug-ins), but why would you?
Changing a field name requires full access, and if you cannot modify in the Manage Database, you probably cannot with xDBC, either.
And changing a field name should change reference (that are not hard-coded), so that's a handy thing to have happen!
What is the purpose of programmatically changing the name of a field? Is there a need to export different column names, for example, or other objectives?
Once a field has been created in a table, is there a way to change its name via a script ?
Why do you want to do this; and why not just get into Define Database and make the change?
Or click on a column header in table view and rename it there.
really what is the need for this?
The purpose here is to create an Excel file whose columns represent fields of an alumni database that have been modified and the cells contain the new value of the corresponding field. This Excel file is then imported by a different database (not FileMaker) to reflect the changes.
I have a table that contains the names of the fields that are most susceptible to change. Since this could vary over time, I would like the user to be able to specify different fields without having to get into Define Database and make the change there.
I didn't know that changing the name in table view would modify the name in the table itself. This could do the job.
This could be a dangerous method, though possible. It might be better to provide a means to "map" the field names to values which are changeable, but not causing permanent change to the field name. There are several threads on this forum on how to change the header row for Excel export.
Thank you, I will try to use this technique.
Retrieving data ...