Article View: comp.sys.mac.apps
Article #10626Re: Help needed in 4th Dimension
From: BMUG
Date: Wed, 05 Jun 1991 02:58
Date: Wed, 05 Jun 1991 02:58
57 lines
3003 bytes
3003 bytes
In article <1991Jun4.125845.5245@vax5.cit.cornell.edu> aqhx@vax5.cit.cornell.edu writes:
>HELP!!!
>
>I have two questions about programming in 4th Dimension that I wish someone can
>help me.
>
>Question 1
>I have created a Choice Input Layout with choices 0, 1, and 2. If I input 0, I
>will be switched to Layout 0. If I input 1, I will be switched to Layout 1.
>If I input 2, I will be switched to Layout 2. In Layout 0, 1, and 2, there is
>a field called Choice, where the choice (0,1, or 2) that I have made in Choice
>Input Layout will be displayed. In other word, I don't want to input the
>choice again; I want the program to remeber my choice and display it. How do I
>do that?
>
The easiest way to do this is to make each of your input layouts separate
pages. Then you'd have a button on the first page with a script that
executes "GoTo Page 2" and sets a variable so "myVar:="Choice 1". On page
2 of your layout you have a nonenterable variable (myVar) which will
display the value you've set. You'd have another button for your third
page. myVar can be used elsewhere as a flag if need be.
>Question 2
>Beside Choice Input Layout, Layout 1, 2, and 3, I also have a Output Layout.
>When I am in User mode, I am in Output Layout first. But when I want to add a
>new record, I am always returned to the last layout that I have finished data
>entry. Instead, I want Choice Input Layout to be the layout that I will be
>working with whenever I decide to add a new record. Can someone tell me how do
>I do that?
>
In this case, you'd use the myVar flag to set the page number of the input
layout when you go to it. The way I do this is to use an invisible button
on the layout with a script (and the "only if modified" checkbox turned
off) to run my Before phase stuff. Since myVar has been previously set,
I'd do something like this:
If(Before)
Case of
:(myVar=1)
GoTo Page(2)
:(myVar=2)
GoTo Page(3)
End case
End if
This is the barest bones summary of what you need to do; other
enhancements would include buttons on each of your pages to reset your
Choice variable on the fly.
Hope this helps!
John Heckendorn
--
/\
BMUG ARPA: bmug@garnet.berkeley.EDU A__A
1442A Walnut St., #62 BITNET: bmug@ucbgarne |()|
Berkeley, CA 94709 Phone: (415) 549-2684 | |
Technical Details
Message-ID:
<1991Jun5.025801.23554@agate.berkeley.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!stanford.edu!agate!garnet.berkeley.edu!bmugReferences:
<1991Jun4.125845.5245@vax5.cit.cornell.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.mac.apps Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!stanford.edu!agate!garnet.berkeley.edu!bmug From: bmug@garnet.berkeley.edu (BMUG) Subject: Re: Help needed in 4th Dimension Message-ID: <1991Jun5.025801.23554@agate.berkeley.edu> Sender: root@agate.berkeley.edu (Charlie Root) Organization: University of California, Berkeley References: <1991Jun4.125845.5245@vax5.cit.cornell.edu> Distribution: comp Date: Wed, 5 Jun 1991 02:58:01 GMT Lines: 57