Is it possible to attach a script to a field, so that always when the
content is changed, the script runs? I'd like to run a script on a
global field, that will take the entered value and use it as a basis for
creating several records in related databases.
Is there an (non applescript) event model in Filemaker, that I can be
(made) more aware of? Or is it all hidden? I'd like to stay in more
control over what happens on my layouts.
|
|
0
|
|
|
|
Reply
|
michaellastname (33)
|
9/12/2003 10:52:31 AM |
|
You can use the events plugin from Waves in Motion to trigger a script
when a field is modified. However, I believe this works by placing an
external function inside the field validation calculation. Obviously,
there is no field validation for globals.
However, there is an old undocumented trick that allows you to add
validation to globals. If you take a regular field (text, number, date,
time, etc) and set a validation for it, then change the field to a
global, the validation will still be applied when editing the global
field. I'm not sure if an external functional would still be triggered
though, but I imagine it would.
You can check out the events plug-in at:
http://www.wmotion.com/events.html
(btw, there are several other similar plug-ins on the market; check
filemaker's web site for a fairly comprehensive listing of plug-ins:
http://www.filemaker.com/plugins -- look on the right side, there is a
list of plug-in categories with more plug-ins.)
--
Mariano Peterson
Posted via http://dbforums.com
|
|
0
|
|
|
|
Reply
|
marianopeterson
|
9/12/2003 9:19:15 PM
|
|
Hi Michael
Not currently (we all live in hope...).
There is a work around but it really only works with fields that are
formatted as pop-up lists since the entire entry has to be made in the space
of a single loop.
Take the field out of the tab order and make it a button attached to a
script:
Set Field [ FieldName, "" ]
Go to Field [ FieldName ] [ Select/perform ]
Loop
Pause/Resume Script [ �0:00:01� ]
Exit Loop If [ not IsEmpty(FieldName) ]
End Loop
.... followed by whatever you want to happen after the field is entered or
edited.
On Windows, I believe you can set the pause to nothing and that it performs
better. ("Its just a bug", she consoles herself...)
Bridget Eley
in article 1g15gpl.1lif00f127asfyN%michaellastname@mac.com, Michael Bystroem
at michaellastname@mac.com wrote on 12/9/03 8:52 PM:
> Is it possible to attach a script to a field, so that always when the
> content is changed, the script runs? I'd like to run a script on a
> global field, that will take the entered value and use it as a basis for
> creating several records in related databases.
>
> Is there an (non applescript) event model in Filemaker, that I can be
> (made) more aware of? Or is it all hidden? I'd like to stay in more
> control over what happens on my layouts.
|
|
0
|
|
|
|
Reply
|
Bridget
|
9/12/2003 10:14:45 PM
|
|
Bridget Eley <bridgeteley@ihug.com.au> wrote:
> There is a work around but it really only works with fields that are
> formatted as pop-up lists since the entire entry has to be made in the space
> of a single loop.
Thanks Bridget. At least one of my problems will be solved by this. Very
nice.
|
|
0
|
|
|
|
Reply
|
michaellastname
|
9/13/2003 11:30:24 PM
|
|
marianopeterson <member38786@dbforums.com> wrote:
> However, there is an old undocumented trick that allows you to add
> validation to globals. If you take a regular field (text, number, date,
> time, etc) and set a validation for it, then change the field to a
> global, the validation will still be applied when editing the global
> field. I'm not sure if an external functional would still be triggered
> though, but I imagine it would.
I'll check it out. Thanks for the tip.
> http://www.filemaker.com/plugins
Cool. I'll have a look.
|
|
0
|
|
|
|
Reply
|
michaellastname
|
9/13/2003 11:30:25 PM
|
|
Bridget Eley <bridgeteley@ihug.com.au> wrote:
> There is a work around but it really only works with fields that are
> formatted as pop-up lists since the entire entry has to be made in the space
> of a single loop.
>
> Take the field out of the tab order and make it a button attached to a
> script:
>
> Set Field [ FieldName, "" ]
> Go to Field [ FieldName ] [ Select/perform ]
> Loop
> Pause/Resume Script [ "0:00:01" ]
> Exit Loop If [ not IsEmpty(FieldName) ]
> End Loop
>
> ... followed by whatever you want to happen after the field is entered or
> edited.
Bridget, when I tried this now I realized this nice solution would be
close to perfect if you could post a mouse click to bring up the popup.
Is there any way in Filemaker to post a mouseclick?
As it is know the user have to click twice to bring up the list.
|
|
0
|
|
|
|
Reply
|
michaellastname
|
9/24/2003 12:05:46 PM
|
|
in article 1g1rqxt.1hix8bb1yc6zziN%michaellastname@mac.com, Michael Bystroem
at michaellastname@mac.com wrote on 24/9/03 10:05 PM:
> Bridget, when I tried this now I realized this nice solution would be
> close to perfect if you could post a mouse click to bring up the popup.
> Is there any way in Filemaker to post a mouseclick?
Only in our dreams...
> As it is know the user have to click twice to bring up the list.
The popup should appear on the first click.
--
Bridget Eley
(to email direct, replace "DOT" with "." and remove ".invalid")
|
|
0
|
|
|
|
Reply
|
Bridget
|
9/24/2003 8:41:20 PM
|
|
Michael Bystroem <michaellastname@mac.com> wrote:
> Bridget Eley <bridgeteley@ihug.com.au> wrote:
>
> > There is a work around but it really only works with fields that are
> > formatted as pop-up lists since the entire entry has to be made in the space
> > of a single loop.
> >
> > Take the field out of the tab order and make it a button attached to a
> > script:
> >
> > Set Field [ FieldName, "" ]
> > Go to Field [ FieldName ] [ Select/perform ]
> > Loop
> > Pause/Resume Script [ "0:00:01" ]
> > Exit Loop If [ not IsEmpty(FieldName) ]
> > End Loop
> >
> > ... followed by whatever you want to happen after the field is entered or
> > edited.
>
> Bridget, when I tried this now I realized this nice solution would be
> close to perfect if you could post a mouse click to bring up the popup.
> Is there any way in Filemaker to post a mouseclick?
>
> As it is know the user have to click twice to bring up the list.
Actually, it worked very nice as Bridget described, if you followed it
closely. Very nice solution indeed.
|
|
0
|
|
|
|
Reply
|
michaellastname
|
11/1/2003 9:16:19 PM
|
|
|
7 Replies
318 Views
(page loaded in 0.118 seconds)
Similiar Articles: attach script to field? - comp.databases.filemakerIs it possible to attach a script to a field, so that always when the content is changed, the script runs? I'd like to run a script on a global field,... run script on entering a field - comp.databases.filemaker ...attach script to field? - comp.databases.filemaker I'd like to run a script on a global field,... ... global_field_a, "") Set field (global_field_b, "") etc. Using Global Fields Help - comp.databases.filemakerYou can then clear the form with: Set field (global_field_a, "") Set field (global_field_b, "") etc. You can attach this script to a "Submit" button on the entry form. html regular button is triggered with an enter key - comp.lang ...attach script to field? - comp.databases.filemaker If you take a regular field (text, number, date, time ... Take the field out of the tab order and make it a button ... Example sending HTML formatted Text as a Body of Email HB_SENDMAIL ...attach script to field? - comp.databases.filemaker If you take a regular field (text, number, date ... but it really only works with fields that are formatted ... Inserting Photos into Container Field - comp.databases.filemaker ...The script that you need to attach to the button should have the following 2 steps: Go To Field PHOTO Insert Picture ... I have a container field ... The script that you Script to Show - Hide a field in a portal - comp.databases ...One is to create a global in the child table, and have the script toggle the ... as the target field to toggle, conditionally on the toggle value, and add that field to ... Paragraph cross references - comp.databases.filemakerThen attach the script to a button above that field in the portal. Cross references: In the lease and addenda file, create a field = cross reference. INSERT PICTURE INTO A CONTAINER FIELD DYNAMICALLY - comp.databases ...I can create a calc with a file path, but where do I put that file path to make the script add the file at that path to a container field? Sorry to but in here, but I'm ... Creating New Record in a Portal; Multiple Portals - comp.databases ...... missing something obvious :-) Of course, I can add a script in the related file to make a new record and execute it from the original file, but the relationship field ... attach script to field? - comp.databases.filemaker | Computer GroupIs it possible to attach a script to a field, so that always when the content is changed, the script runs? I'd like to run a script on a global field,... Adding Scripts to the Form or Field EventsTo add a script to a field: Double click the field; On the Events tab, click Edit. Select the Event is Enabled check box to enable the event and enter the body of the script. 7/15/2012 3:01:12 AM
|