dbTalk Databases Forums  

use find on button fields

comp.databases.filemaker comp.databases.filemaker


Discuss use find on button fields in the comp.databases.filemaker forum.



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

Default use find on button fields - 07-05-2005 , 05:13 PM






hi all,

i was wondering on how to use the find feature in FM7 on fields that
are buttons in browse mode. For example, i have a field that i can
click in browse mode. But i would also like to be able to search by
that field in find mode. Currently in find mode it still behaves as a
button, not as a field i can enter. I have looked at the field format
option and enabled the field to be edited in find mode. If i remove
field from being a button, then in find mode it works fine. Thanks for
the help.


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

Default Re: use find on button fields - 07-05-2005 , 06:53 PM






pri wrote:

Quote:
hi all,

i was wondering on how to use the find feature in FM7 on fields that
are buttons in browse mode. For example, i have a field that i can
click in browse mode. But i would also like to be able to search by
that field in find mode. Currently in find mode it still behaves as a
button, not as a field i can enter. I have looked at the field format
option and enabled the field to be edited in find mode. If i remove
field from being a button, then in find mode it works fine. Thanks for
the help.
Those are your choices. A button is a button in either mode.

The workaround is either to tab into the field or script entry using Go To
Field.

It was nice when they gave us Field Behavior, separating entry into the
field in Find versus Browse. On my "Nice to have" wish list is what I will
call "Conditional Buttons," which would allow us to specify a button based
on a calculation or other criteria, such as whether a button in Browse
would is also a button in Find, etc.

Yes, we can script button behavior based on Mode, modifier keys and
calculations, but we can't enter a field in Find by clicking on it if it
is defined as a button. Conditional Buttons would be handy in a situation
such as this.

Matt


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

Default Re: use find on button fields - 07-05-2005 , 07:52 PM



In article <z3Fye.8835$vE5.7468@trndny07>, "Matt Wills" <I'm (AT) Witz (DOT) end>
wrote:

Quote:
pri wrote:

hi all,

i was wondering on how to use the find feature in FM7 on fields that
are buttons in browse mode. For example, i have a field that i can
click in browse mode. But i would also like to be able to search by
that field in find mode. Currently in find mode it still behaves as a
button, not as a field i can enter. I have looked at the field format
option and enabled the field to be edited in find mode. If i remove
field from being a button, then in find mode it works fine. Thanks for
the help.

Those are your choices. A button is a button in either mode.

The workaround is either to tab into the field or script entry using Go To
Field.

It was nice when they gave us Field Behavior, separating entry into the
field in Find versus Browse. On my "Nice to have" wish list is what I will
call "Conditional Buttons," which would allow us to specify a button based
on a calculation or other criteria, such as whether a button in Browse
would is also a button in Find, etc.

Yes, we can script button behavior based on Mode, modifier keys and
calculations, but we can't enter a field in Find by clicking on it if it
is defined as a button. Conditional Buttons would be handy in a situation
such as this.
As you say, you can easily script the button bahaviour based on Mode.
All you need is to have your button's script check Status(CurrentMode)
and then act accordingly.
ie.
If Status(CurrentMode) = 1
/* we're in Find Mode */
Go To Field [WhichEver_Field]
else
/* we're in Browse Mode */
{do whatever happens when in Browse Mode}
End If

The only real problem here is if when in Find Mode the user goes to
another field and then realises there's a typo in the button field -
you can't position the cursor / select text using the mouse until after
the script has been run and performed the Go To Field command.

You don't need to worry about Preview Mode or Layout Mode since buttons
don't function in either of these, but for the sake of completeness:

Status(CurrentMode) = 0 --> Browse Mode

Status(CurrentMode) = 1 --> Find Mode

Status(CurrentMode) = 2 --> Preview Mode

Status(CurrentMode) = 3 --> Printing in progress

Running a script in Layout Mode switches FileMaker back to Browse Mode
anyway.

Presumably that Status function is now Get(CurrentMode) in FileMaker 7.



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


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

Default Re: use find on button fields - 07-06-2005 , 05:59 AM





Helpful Harry wrote:

Quote:
In article <z3Fye.8835$vE5.7468@trndny07>, "Matt Wills" <I'm (AT) Witz (DOT) end
wrote:

pri wrote:

hi all,

i was wondering on how to use the find feature in FM7 on fields that
are buttons in browse mode. For example, i have a field that i can
click in browse mode. But i would also like to be able to search by
that field in find mode. Currently in find mode it still behaves as a
button, not as a field i can enter. I have looked at the field format
option and enabled the field to be edited in find mode. If i remove
field from being a button, then in find mode it works fine. Thanks for
the help.

Those are your choices. A button is a button in either mode.

The workaround is either to tab into the field or script entry using Go To
Field.

It was nice when they gave us Field Behavior, separating entry into the
field in Find versus Browse. On my "Nice to have" wish list is what I will
call "Conditional Buttons," which would allow us to specify a button based
on a calculation or other criteria, such as whether a button in Browse
would is also a button in Find, etc.

Yes, we can script button behavior based on Mode, modifier keys and
calculations, but we can't enter a field in Find by clicking on it if it
is defined as a button. Conditional Buttons would be handy in a situation
such as this.

As you say, you can easily script the button bahaviour based on Mode.
All you need is to have your button's script check Status(CurrentMode)
and then act accordingly.
ie.
If Status(CurrentMode) = 1
/* we're in Find Mode */
Go To Field [WhichEver_Field]
else
/* we're in Browse Mode */
{do whatever happens when in Browse Mode}
End If

The only real problem here is if when in Find Mode the user goes to
another field and then realises there's a typo in the button field -
you can't position the cursor / select text using the mouse until after
the script has been run and performed the Go To Field command.

You don't need to worry about Preview Mode or Layout Mode since buttons
don't function in either of these, but for the sake of completeness:

Status(CurrentMode) = 0 --> Browse Mode

Status(CurrentMode) = 1 --> Find Mode

Status(CurrentMode) = 2 --> Preview Mode

Status(CurrentMode) = 3 --> Printing in progress

Running a script in Layout Mode switches FileMaker back to Browse Mode
anyway.

Presumably that Status function is now Get(CurrentMode) in FileMaker 7.

Nope. In FM7, it's Get ( WindowMode ), presumably because several windows
can be open concurrently and each can be in a different mode.

Alternative 1: Create a duplicate layout with the fields not defined as
buttons. In a scripted Find process, go to that layout to enter your Find
criteria (with free entry to all fields), and include a step to return to
the original layout once the Find is complete. Drawback: making changes to
the layout is a pain, because it's now doubled.

Alternative 2: For each script assigned to a field as a button, include a
check of Status ( CurrentModifierKeys ) / Get ( ActiveModifierKeys ). If
the specified key or combination is held, enter the field and exit the
script. Drawback: the user will always forget the modifier keys, and run
the script on button click anyway.

In the end, my best solution is NOT to define fields as buttons if I am
going to want to perform finds on them. It has bitten me too many times. I
routinely forget the button and click on the field to enter it. If I do
it, a user will do it.

Alternative 3a: Put an object like an arrowhead or something obvious next
to the field. The are plenty of free icon graphics out there.

Alternative 3b: Make your button a small colored square (7x7 px is a good
size) in the upper left corner of the field. I often use calc fields
(containers) as buttons in this fashion as visual cues. I can control
whether or not they are visible, even to be different colors, depending on
criteria in the record. Adjust the paragraph indent in the text format as
necessary.

Matt


Reply With Quote
  #5  
Old   
pri
 
Posts: n/a

Default Re: use find on button fields - 07-06-2005 , 08:49 AM



hey!!
thanks for all your tips. But i found another way of doing it. I
duplicated the all the fields that were buttons and i wanted to be able
to use in find mode. then i removed from the duplicates the button
feature and made thier fill transparent. Then i overlayed it exactly on
top of the original fields. Now in browse mode, the "two fields" are
buttons and in find mode i can click in and use them. The ONLY
disadvantage of this is that since i overlayed the same field on top of
another field, they both show the same values in browse mode and so the
text seems to be darker and bolded and a bit blurry.

Comments or suggestions? It seems to do what i want but are there any
other sideffects to it? Thanks all!


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

Default Re: use find on button fields - 07-06-2005 , 09:32 AM





pri wrote:

Quote:
hey!!
thanks for all your tips. But i found another way of doing it. I
duplicated the all the fields that were buttons and i wanted to be able
to use in find mode. then i removed from the duplicates the button
feature and made thier fill transparent. Then i overlayed it exactly on
top of the original fields. Now in browse mode, the "two fields" are
buttons and in find mode i can click in and use them. The ONLY
disadvantage of this is that since i overlayed the same field on top of
another field, they both show the same values in browse mode and so the
text seems to be darker and bolded and a bit blurry.

Comments or suggestions? It seems to do what i want but are there any
other sideffects to it? Thanks all!
That indicates they are not exactly aligned and/or not the same color.

Matt


Reply With Quote
  #7  
Old   
pri
 
Posts: n/a

Default Re: use find on button fields - 07-06-2005 , 10:54 AM



Nope! i have double checked the alignment and both fields' are exactly
on top of each other in the same position. If i move one of the fields
away, the text is lighter. But together, they are dark and blurry. Any
ideas?


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

Default Re: use find on button fields - 07-06-2005 , 12:26 PM





pri wrote:

Quote:
Nope! i have double checked the alignment and both fields' are exactly
on top of each other in the same position. If i move one of the fields
away, the text is lighter. But together, they are dark and blurry. Any
ideas?
That's odd. I see it replicated here.

Other than what I thought it was originally, nada.

Matt


Reply With Quote
  #9  
Old   
Howard Schlossberg
 
Posts: n/a

Default Re: use find on button fields - 07-06-2005 , 12:36 PM



Quote:
The ONLY
disadvantage of this is that since i overlayed the same field on top of
another field, they both show the same values in browse mode and so the
text seems to be darker and bolded and a bit blurry.

Comments or suggestions? It seems to do what i want but are there any
other sideffects to it? Thanks all!

That indicates they are not exactly aligned and/or not the same color.
Or that Pri has not upgraded to 7.0v3? This was a problem on v1 and
maybe v2.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Pro Solutions Los Angeles, California

FileMaker 7 Certified Developer
Associate Member, FileMaker Solutions Alliance


Reply With Quote
  #10  
Old   
pri
 
Posts: n/a

Default Re: use find on button fields - 07-06-2005 , 01:02 PM



howard thank you. i still have version 1. i will update to v3 asap.
thanks for the help.


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.