Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > comp.databases.filemaker > #3254
| Newsgroups | comp.databases.filemaker |
|---|---|
| Subject | Re: "Active" Layouts |
| From | csampson@inetworld.net (Charles H. Sampson) |
| Date | 2019-07-10 16:54 -0700 |
| Message-ID | <1oaibpi.1bh9lm41rnfd98N%csampson@inetworld.net> (permalink) |
| References | <1nz4oav.8ewbn616z2srxN%csampson@inetworld.net> <ptva1i$pm8$1@gioia.aioe.org> <1o5may1.1825r9qoj3oefN%csampson@inetworld.net> <q8blqh$3ee$1@gioia.aioe.org> |
Helpful Harry <HelpfulHarry@BusyWorking.com> wrote: > On 2019-04-06 22:41:13 +0000, Charles H. Sampson said: > > > Helpful Harry <HelpfulHarry@BusyWorking.com> wrote: > > > >> On 2018-12-01 19:47:48 +0000, Charles H. Sampson said: > >> > >>> This is my latest request for a tutorial: > >>> > >>> I want to have a layout whose fields vary depending on the value of a > >>> field. The "selector" field is represented by radio buttons. Each button > >>> choice triggers which fields in the record are to be displayed. > >>> > >>> I have this poorly implemented at the moment. The implementation > >>> involves multiple copies of a layout, one copy for each button setting. > >>> There are also several scripts. Clicking on a button runs a script that, > >>> among other things, goes to the appropriate layout copy showing the > >>> desired fields. > >>> > >>> This works, but it's terrible software engineering. A change to one > >>> layout must be made, identically, to the others. A change to one script > >>> requires consideration of unintentional side-effects on the other > >>> scripts. > >>> > >>> There's got to be a better way, but my old Pogue book doesn't shed any > >>> light. > >>> > >>> Charlie > >> > >> That's how I've done it in the past with old version of FileMaker Pro > >> (and it can be highly annoying when a customer wants a "minor" > >> change to the Layout which in reality means changing multiple layouts). > >> > >> BUT in newer versions it's very far easier. > >> > >> 1. In Layout Mode, select both the field AND it's fieldname label. > >> > >> 2. In the Inspector Panel click on the "Data" section (the drum-like > >> icon). > >> > >> 3. The second sub-set of options is "Behavior". Click on the edit button > >> and you can insert a calculation for when the field is displayed. > >> > >> For example, if you set MyAppearingField to use a Behavior calculation > >> of: > >> (MyField = "Fred") > >> > >> then MyAppearingField (and its label) will only be displayed when > >> MyField contains the data "Fred" (without quote marks) - if MyField > >> contains any other data or is empty, then MyAppearingField will not be > >> displayed. > >> > >> You may also want to tick the little box to use the same Behaviors when > >> the Layout is in Find Mode. That way users can only find data in > >> MyAppearingField when MyField has the data "Fred" entered. > > > > Thanks, Harry. > > > > The Christmas rush got to me and once I had gotten out of the habit of > > looking at USENET it was hard to get back. > > > > This information was what I needed. One quibble: The behavior that one > > specifies is for when the field is hidden, not shown. That pales in > > comparison to the useful information you gave. > > You're right. That should have said: > MyField <> "Fred" > so that the field is displayed when the trigger field does contain "Fred". > > Not sure now whether that was a mistake, a typo, or an auto-correction > from the non-ASCII not-equal symbol. > > > > > I also needed to place fields (and labels) on top of each other, only > > one showing at a time, of course. I could only do this using the > > position specification in the inspector. > > Another possibility, if there's a limited number of options, is the > "Tab Control" Layout item that is in newish version of FileMaker Pro. > You can put all the 'normal' fields on the Layout, and then the > data-specific ones in separate tab areas within the Tab Control (using > the example, you could have one tab for "Fred" another tab for "Bert", > etc.). > > > > > One minor irritation is still left. Whenever I change the radio button, > > make the appropriate data changes, and attempt to leave the record, I > > get a dialog asking if I want to accept the changes before leaving the > > record. I'm pretty sure I can get rid of this by attaching a script that > > commits the record as I try to leave, but I haven't checked that out > > yet. (It's been a busy three months.) > > I did a quick test file, but couldn't get it to display that message, > so I'm not sure why (it may depend on what your Script is doing). I > know the newish approach to not automatically saving data can be an > anoyance in other functions though. > Sorry to be so slow in getting back. An automobile accident has sidelined me for two months. This last issue is easy, sort of. In the Layout Setup dialog is a checkbox for "Save record changes automatically." I checked that and my problem went away. How it ever got unchecked is another question and one that I'm not interested in pursuing. Charlie -- Nobody in this country got rich on his own. You built a factory--good. But you moved your goods on roads we all paid for. You hired workers we all paid to educate. So keep a big hunk of the money from your factory. But take a hunk and pay it forward. Elizabeth Warren (paraphrased)
Back to comp.databases.filemaker | Previous | Next — Previous in thread | Find similar
"Active" Layouts csampson@inetworld.net (Charles H. Sampson) - 2018-12-01 11:47 -0800
Re: "Active" Layouts Helpful Harry <HelpfulHarry@BusyWorking.com> - 2018-12-02 13:46 +1300
Re: "Active" Layouts csampson@inetworld.net (Charles H. Sampson) - 2019-04-06 15:41 -0700
Re: "Active" Layouts Helpful Harry <HelpfulHarry@BusyWorking.com> - 2019-04-07 14:04 +1200
Re: "Active" Layouts csampson@inetworld.net (Charles H. Sampson) - 2019-07-10 16:54 -0700
csiph-web