dbTalk Databases Forums  

refer to fields anonymously

comp.databases.filemaker comp.databases.filemaker


Discuss refer to fields anonymously in the comp.databases.filemaker forum.



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

Default refer to fields anonymously - 06-13-2005 , 03:04 PM






I would like to write a script where I click on a field and it goes to
the third record after it. So for example, if I click on a field and it
happens to contain 5, then it goes to record number 8. The catch is
that in different parts I used different field names. So is it possible
to refer to or evaluate the field in the script when the field is
clicked on? Thus, I would not have to make separate scripts for each
differently name field that perform the same function.


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

Default Re: refer to fields anonymously - 06-13-2005 , 06:44 PM






What version of FileMaker?

In 6, look at the status functions, particularly Status ( CurrentFieldName ) and Status ( CurrentFieldContents ).

In 7, they have become Get ( ActiveFieldName ) and Get ( ActiveFieldContents ).

I'm not having much luck with it, though, because defining a field as a button apparently does not allow the field to become active, so the status thing becomes moot. I tried the invisible button thing, but that works only if the button is on top of the field and you specifically click it, not just click anywhere in the field.

If you're in 7, take a look at EventScript, a free plugin from http://softs4humans.com. One of its functions triggers a script on entry to a field.

Matt

On 6/13/2005, pri wrote:

Quote:
I would like to write a script where I click on a field and it goes to
the third record after it. So for example, if I click on a field and it
happens to contain 5, then it goes to record number 8. The catch is
that in different parts I used different field names. So is it possible
to refer to or evaluate the field in the script when the field is
clicked on? Thus, I would not have to make separate scripts for each
differently name field that perform the same function.

Reply With Quote
  #3  
Old   
Helpful Harry
 
Posts: n/a

Default Re: refer to fields anonymously - 06-14-2005 , 01:42 AM



In article <HTore.7286$5s1.1953@trndny06>, "Matt Wills" <I'm (AT) Witz (DOT) end>
wrote:
Quote:
On 6/13/2005, pri wrote:

I would like to write a script where I click on a field and it goes to
the third record after it. So for example, if I click on a field and it
happens to contain 5, then it goes to record number 8. The catch is
that in different parts I used different field names. So is it possible
to refer to or evaluate the field in the script when the field is
clicked on? Thus, I would not have to make separate scripts for each
differently name field that perform the same function.

What version of FileMaker?

In 6, look at the status functions, particularly Status ( CurrentFieldName )
and Status ( CurrentFieldContents ).

In 7, they have become Get ( ActiveFieldName ) and Get ( ActiveFieldContents
).

I'm not having much luck with it, though, because defining a field as a
button apparently does not allow the field to become active, so the status
thing becomes moot. I tried the invisible button thing, but that works only
if the button is on top of the field and you specifically click it, not just
click anywhere in the field.

If you're in 7, take a look at EventScript, a free plugin from
http://softs4humans.com. One of its functions triggers a script on entry to a
field.
If you've defined fields to be buttons, then the easiest solution would
be to have a separate script for each button - but to save the
necessity of making the same change to 20 different scripts whenever
you find a mistake or want it to do something different / additional,
what you can do is use a "stub script" for each field / button that
stores that field's value in a Global field and then runs one main
script.
ie.
Script for field / button #1
Set Field [Global, Field1]
Perform Script [MainScript]


Script for field / button #2
Set Field [Global, Field2]
Perform Script [MainScript]


etc.


Depending on what those fields are actually for, a better solution
might be to spend the time now correcting the database design so that
all the fields are the same one instead of multiple fields - it could
save a lot of hassle later.



Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


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.