I'm trying to update a text literal that is part of our logging functions it runs in the auto enter calc of a text field.
Script a Set Field step.
There may be no way to change field option with script, use variable or global field instead of literal text.
If the file is shared by ODBC/JDBC, there is syntax for changing default value, but I didn't tested it.
ALTER TABLE table_name ALTER [COLUMN] column_definition SET DEFAULT expr
@keywords Thank you for the reply, Nothing I've tried will set the auto enter calculation attribute of the text field just the field itself, I would think there should be some way to script it but I haven't found it.
@user19752 Thank you too, that's over my head, I'm trying something with global fields but I can't get that to work either.
No, you can't change the auto-enter options by script. If you've got literal text in there, you need to move it out.
You can store that text in a field that lives in a single record table. On startup, you would have a script run that goes to a layout based on that single record table (often called a settings table), and set a global field or a global variable to that field.
Then you reference that global in your auto enter.
This way you never need to Manage Database to change something that is dynamic.
Sorry my earlier reply was so cryptic. I didn't mean that you could use a set field script step to alter the auto enter setting, so I apologise if that led you on a wild goose chase. What I meant was to use a script to set the field, rather than an auto enter, which you would trigger in some way that gave you the dynamic behaviour you are looking for. Still, in the meantime David has described a pretty good method. Try that.
Retrieving data ...