dbTalk Databases Forums  

Scripted Control of Auto-Enter Options

comp.databases.filemaker comp.databases.filemaker


Discuss Scripted Control of Auto-Enter Options in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jahn
 
Posts: n/a

Default Scripted Control of Auto-Enter Options - 01-28-2010 , 02:52 PM






On FM 10 Advanced, does anyone know if there's a way to turn the auto-
enter options on and off via a script? I run a periodic maintenance
script on the table -- I won't bore you with the details -- that
updates a field in every record, which also updates the mod by and mod
date fields. But I'd rather the modification data reflect
modifications by users, not by me, so that they're able to see when
they made changes to the record rather than when the maintenance
script was run.

There are a lot of fields in this particular table, so script triggers
for setting the modification data would be onerous. If there were a
way to turn the auto-enter off at the start of the script and on again
at the end, that would be ideal.

Anyone got an idea?

Thanks,
-J.

Reply With Quote
  #2  
Old   
Christoph Kaufmann
 
Posts: n/a

Default Re: Scripted Control of Auto-Enter Options - 01-29-2010 , 12:05 AM






jahn <jahnbigbooty (AT) yahoo (DOT) com> wrote:

Quote:
On FM 10 Advanced, does anyone know if there's a way to turn the auto-
enter options on and off via a script? I run a periodic maintenance
script on the table -- I won't bore you with the details -- that
updates a field in every record, which also updates the mod by and mod
date fields. But I'd rather the modification data reflect
modifications by users, not by me, so that they're able to see when
they made changes to the record rather than when the maintenance
script was run.
I don't see a way to do this, but you might get what you need from the
superlog function that will write the user's changes into a text field:
http://www.nightwing.com.au/FileMake...8/demo809.html

It will not reflect changes by script unless you add the process to a
spedicific. script.

Anotherway is to create a log table with a record for every change that
is made and use script triggers to create the records.
--
http://clk.ch

Reply With Quote
  #3  
Old   
Scott in SoCal
 
Posts: n/a

Default Re: Scripted Control of Auto-Enter Options - 01-29-2010 , 03:15 AM



On Jan 28, 12:52*pm, jahn <jahnbigbo... (AT) yahoo (DOT) com> wrote:
Quote:
On FM 10 Advanced, does anyone know if there's a way to turn the auto-
enter options on and off via a script? *I run a periodic maintenance
script on the table -- I won't bore you with the details -- that
updates a field in every record, which also updates the mod by and mod
date fields. *But I'd rather the modification data reflect
modifications by users, not by me, so that they're able to see when
they made changes to the record rather than when the maintenance
script was run.

There are a lot of fields in this particular table, so script triggers
for setting the modification data would be onerous. *If there were a
way to turn the auto-enter off at the start of the script and on again
at the end, that would be ideal.

Anyone got an idea?

Thanks,
-J.
You can export the modifier/modification fields, run rest of the
maintenance script, and then import the original values back in. Just
make sure auto-enter option is unchecked for the re-import.

Reply With Quote
  #4  
Old   
jahn
 
Posts: n/a

Default Re: Scripted Control of Auto-Enter Options - 01-29-2010 , 11:26 AM



Christoph and Scott -

Thanks for your suggestions. While looking at the SuperLog system, it
occurred to me that one way to do this without plugins or scripts is
to use the following fields, where "[p]" is the pilcrow character:

ModBy = auto-enter calculated value: Substitute ( LeftValues
( Substitute ( ModByMirror ; "Developer[p]" ; "" ) ; 1 ) , [p] , "" )
ModByHistory = auto-enter calculated value: ModByCurr & [p] &
ModByHistory
ModByCurr = auto-enter modification account name

That way, any changes by Developer are automatically ignored, while
changes by others are recorded. Another alternative that would ignore
changes made by _anyone_ running the maintenance script is simply to
end the script with a final Replace step in the ModBy field using the
following:

Substitute ( MiddleValues ( ModByHistory ; 2 ; 1 ) , [p] , "" )

That grabs the second value in the MobByHistory field -- in other
words, the name of the person who made the change before the most
recent change. I'm not sure the second value is right; it might need
to be third value or deeper, depending on how many changes were made
and how FM records them, but based on my tests, it works in principle.

Thanks for getting me started in the right direction. I think this is
what I'm looking for.

Best,
-J.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.