dbTalk Databases Forums  

Triggering scripts secretly

comp.databases.filemaker comp.databases.filemaker


Discuss Triggering scripts secretly in the comp.databases.filemaker forum.



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

Default Triggering scripts secretly - 09-02-2005 , 08:21 PM






How can I trigger a script when a user leaves a field?

This is the result of a larger problem, which is that FM doesn't
refresh my calculations on the layout where the data is displayed,
because (I believe) the calculations use data from 3 different tables
and one of them is a table away from the layout. I have to go to the
second table, force the calculations to update (by adding and then
subtracting 1 from one of the fields-ugly, I know, but it's the only
thing that would work) and then go back to the original layout.

So if someone has a solution for the bigger problem, I would be
grateful. In the meantime, I have a button that the user has to press
to get the calcs to update. If there is some way I could hide that
script so that it happens automaticallly upon data entry or just after,
that would be helpfull as well.

Thanks.


Reply With Quote
  #2  
Old   
FP
 
Posts: n/a

Default Re: Triggering scripts secretly - 09-03-2005 , 12:40 AM






If your in FM7 and you want the record to update your script should
commit the record, then refresh screen with the checkbox flush cached
results checked.

You could try the plugin oazium events which can run a script upon
leaving the field, I think I saw a free plugin that does the same thing
mentioned in this group somewhere.


Reply With Quote
  #3  
Old   
Matt Wills
 
Posts: n/a

Default Re: Triggering scripts secretly - 09-03-2005 , 12:54 AM



Olman Feelyus wrote on (9/2/2005):

Quote:
How can I trigger a script when a user leaves a field?

This is the result of a larger problem, which is that FM doesn't
refresh my calculations on the layout where the data is displayed,
because (I believe) the calculations use data from 3 different tables
and one of them is a table away from the layout. I have to go to the
second table, force the calculations to update (by adding and then
subtracting 1 from one of the fields-ugly, I know, but it's the only
thing that would work) and then go back to the original layout.

So if someone has a solution for the bigger problem, I would be
grateful. In the meantime, I have a button that the user has to press
to get the calcs to update. If there is some way I could hide that
script so that it happens automaticallly upon data entry or just after,
that would be helpfull as well.

Thanks.
For whatever reason, FileMaker doesn't do that.

1. Try EventScript, a free plugin from http://www.softs4humans.com to
execute a script on change to a specified field. That, or zippScript. A
script to go to another layout and back would happen quickly enough that
it would not be noticed.

2. Would just placing the relevant fields on the working layout elminate
the problem? If that solves it, you could size them at 1x1 pixel to hide
them somewhere on the layout.

3. Even if you had to create a new TO/relationship to accommodate this
issue, seems it would be a little less ugly than the brute force method.

Matt


Reply With Quote
  #4  
Old   
Olman Feelyus
 
Posts: n/a

Default Re: Triggering scripts secretly - 09-03-2005 , 01:37 PM



Thanks for the help. I ended up changing the field that was
user-controlled and it solved the problem. I deleted that ungainly
scrip. Muy satisfying. But your recommendations are leading me down
other paths of usefulness. That EventScript looks chock full of useful
additions.


Reply With Quote
  #5  
Old   
Matt Wills
 
Posts: n/a

Default Re: Triggering scripts secretly - 09-03-2005 , 03:26 PM



Olman Feelyus wrote on (9/3/2005):

Quote:
Thanks for the help. I ended up changing the field that was
user-controlled and it solved the problem. I deleted that ungainly
scrip. Muy satisfying. But your recommendations are leading me down
other paths of usefulness. That EventScript looks chock full of useful
additions.
The simplest thing to implement is the basic "on change to field, run this
script" feature. The "on entry" and others require pretty involved
user/privileges stuff.

I've got a small file that demonstrates the "on change" fuction, using a
drop-down list as a menu, if you would like a copy.

Matt


Reply With Quote
  #6  
Old   
Olman Feelyus
 
Posts: n/a

Default Re: Triggering scripts secretly - 09-03-2005 , 04:08 PM



Very much so. I'd be grateful if you could email it to me at my gmail
address.

Thanks!


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.