« Personal Training Ses… | Home | MBS Filemaker Plugin,… »

Create fields in Filemaker database from a Script

Just a quick note: You can create/remove fields form a Filemaker database using scripts. A call like this creates a new field:

MBS("FM.ExecuteSQLOnIdle";"ALTER TABLE TestTable ADD MyField varchar")

We change the table TestTable and add a new field called MyField with type text (varchar).
Also you can remove a field:

MBS("FM.ExecuteSQLOnIdle";"ALTER TABLE TestTable DROP COLUMN MyField")

It is important to use FM.ExecuteSQLOnIdle to avoid a deadlock. So only when the database is not in use (at idle time), you can change it. For next plugin prerelease we updated FM.ExecuteSQL.LastErrorMessage to also report error messages from FM.ExecuteSQLOnIdle. Claris FileMaker Plugin
24 02 13 - 17:47

Start Chat