Terrible Toll Posted August 20, 2007 Posted August 20, 2007 Does anyone out there know if it is possible to override the auto-enter settings for a field temporarily as a script step. Specifically, if I want to import some records and modify them witha few subsequent calculations, I don't want the Date Modified field updating. I wanted to avoid having to re-import the date field again afterwards. cheers - Anatole
Vaughan Posted August 20, 2007 Posted August 20, 2007 It could be possible to put in conditional aut-enter calculations, but it'd massively complicate things. (I'd hate to be the person maintaining the database.) Since the process is scripted, it's easy just to let the auto-enters happen theloop through the found set of records and use Set Field[] to over-write the auto-entered values.
mikegfy Posted May 20, 2009 Posted May 20, 2009 What about if the date modified is being auto entered? you can back up the original date, then change the fields you want. the date modified will be auto entered to the current date. then in the script you set the modified date back to it's original, but by changing the field it auto enters the current date again. How can i get around this?
Vaughan Posted May 20, 2009 Posted May 20, 2009 Turn off the auto-enter, do the record mods, then turn the auto-enter back on again.
comment Posted May 21, 2009 Posted May 21, 2009 You can turn off auto-enter during import. If there's additional processing to be done, you could import to a temp table and do it there, before importing to the "real" table.
mikegfy Posted May 21, 2009 Posted May 21, 2009 How do i turn off the auto-enter? if you mean modifying the field definition manually, that's not gonna help. It has to be automated.
comment Posted May 21, 2009 Posted May 21, 2009 It's an option you get when you set up the import (both manually and in a script). It's turned off for the duration of import only.
mikegfy Posted May 21, 2009 Posted May 21, 2009 I want it to work inside a script, without using an import. I'm not using the import script step. I want to change a field without the modified date changing. I don't think that's possible without editing the field definition.
mikegfy Posted May 21, 2009 Posted May 21, 2009 I've got an idea. I'm gonna make a new table that will hold the date at the beginning of the script. then at the end of the script i will import the date (with auto-enter turned off). It's not simple but it should work. Thanks for the idea of using import with auto-enter turned off.
comment Posted May 21, 2009 Posted May 21, 2009 I don't think that's possible without editing the field definition. Anything (almost) is possible - the question is whether it's also desirable. For example, you could define a DateModified2 field with auto-entered calculation = Case ( gAutoEntryOff ; DateModified2 ; DateModified ) where gAutoEnterOff is a global field. Then have your script set the global to 1 before changing any values, and back to 0 or empty when done. Or you could use the script name as the condition. However, I am not at all convinced this is better than doing the processing in a table where there are no auto-enters at all.
mr_vodka Posted May 21, 2009 Posted May 21, 2009 (edited) Here is a sample. See if this works for you. *Edit - Ah Michael pretty much covered it. timestamp_test.zip Edited May 21, 2009 by Guest
adyf Posted June 10, 2009 Posted June 10, 2009 Turn off the auto-enter, do the record mods, then turn the auto-enter back on again. It is possible to do this as a script step in Filemaker 6?
Recommended Posts
This topic is 5645 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now