Create fields in Filemaker database from a Script
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.