dbTalk Databases Forums  

Help Void Out Button

comp.databases.filemaker comp.databases.filemaker


Discuss Help Void Out Button in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
squeed2000@yahoo.com
 
Posts: n/a

Default Help Void Out Button - 08-22-2005 , 02:38 PM






I have a layout that I send a user to from 2 other layouts. I want the
user to be unable to use a button on the destination layout if they are
sent there from layout 1 but be able to use it if they are sent from
layout 2.

Is this possible ?

-S


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

Default Re: Help Void Out Button - 08-22-2005 , 04:08 PM






In article <1124739483.885720.133620 (AT) g14g2000cwa (DOT) googlegroups.com>,
squeed2000 (AT) yahoo (DOT) com wrote:

Quote:
I have a layout that I send a user to from 2 other layouts. I want the
user to be unable to use a button on the destination layout if they are
sent there from layout 1 but be able to use it if they are sent from
layout 2.

Is this possible ?
Use a Global field to store the layout the user came from. Then your
button's script can start with an If statment
ie.
If [g_From_Layout = "2"]
{do button function}
End If

This means that your buttons on layout 1 and layout 2 to go to the new
layout will need to run a short script rather than just use the Go To
Layout command in the Define Button window. Their scripts simply need
to set the g_From_Layout field and then Go To Layout.
ie.
Set Field [g_From_Layout, {whichever layout}]
Go To Layout [New_Layout]

In older versiosn of FileMaker you can use either a separate script
(one for each button on the two layouts) or one script that uses the
Status(CurrentLayoutName) to work out which one to set g_From_Layout
to. In FileMaker 7 you can do either of those or one script and the new
script parameter ability.


That's the simple version, but you can add enhancements you can add to
to that.

You can get fancy and have a Global container field to store the button
image, and change that image to a 'ghosted' version when they come from
layout 1. You'll still need the If statment since the button will still
exist and be clickable.

To get around that and be really fancy you can use a relationship and a
portal to actually hide the button when it can't be used. Using a
static 'ghosted' button image on the layout with the portal and real
button layered on top - that way the 'ghosted' button gets hidden by
the portal version whenever the user arrives from layout 2.



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


Reply With Quote
  #3  
Old   
eyebrown@mindspring.com
 
Posts: n/a

Default Re: Help Void Out Button - 08-23-2005 , 06:18 AM



In article <230820050908464542%helpful_harry (AT) nom (DOT) de.plume.com>, Helpful
Harry <helpful_harry (AT) nom (DOT) de.plume.com> wrote:


Quote:
To get around that and be really fancy you can use a relationship and a
portal to actually hide the button when it can't be used.
I do something similar. I have two identical versions of the target
layout. The only difference is the script run by the button. So when you
come from Layout A, you go to the version with a Layout A button attached
to the button, B to B, etc. The user never sees any difference, except in
navigation.

Steve Brown


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.