🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac.databases
Article #126

Re: FileMaker Pro Question

#126
From: David Graham
Date: Mon, 10 Aug 1992 12:01
49 lines
2698 bytes
In <1992Aug7.122345.7136@nestroy.wu-wien.ac.at> sinkovics@wu-wien.ac.at (Rudolf R. Sinkovics) writes:

> Suppose in a database there is a text field with 3 or more options:
>name_of_field: (o) option1 , (o) option 2, (o) option 3

>Whenewer I enter a dataset I check out one of these options. How can I
>automatically detect the total number of option1, option2, option3 ?
>When I say automatically I mean that I don't want to search for each of
>these options, and let filemaker find the numbers.

You can do this two ways-

1. Create a summary field which is 'Count of name_of_field' and a new layout
with a no body but a subsummary part sorted by name_of_field. Place both
the field name_of_field and the summary field side by side on this part.
When you sort by name_of_field and preview, you should get your three
options each with the number of occurences of each beside them.

2. Create six new fields; first three calculation fields, one for each
option. The first calculation would be-
	if(name_of_field=option1;1;0)
...and the second and third would be similar. Then you create three summary
fields, one for each option, each of which is set to count of (the 
corresponding calculation). Then you can preview these three fields at
any time  without having to sort and it will give you the totals for
your current find request. You can also use the totals further using the
Summary() function, but this get slow and fiddly.

As I don't have FileMaker to hand right now, I haven't tested either of
the above solutions.

Disclaimer: If either of these solutions goes mad and trashes your data,
it wasn't my fault.

Hope this helped,

David
---
   \--- David Graham ------- Internet: dagraham@unix1.tcd.ie ---\
    \---- C.24 Dept of Statistics, Trinity College, Dublin 2 ----\
    /----- +353-1-286 8571 (home)   +353-1-702 2048 (work) ------/
   /---------- "On a clear disc you can seek forever" ----------/


--
   \--- David Graham ------- Internet: dagraham@unix1.tcd.ie ---\
    \---- C.24 Dept of Statistics, Trinity College, Dublin 2 ----\
    /----- +353-1-286 8571 (home)   +353-1-702 2048 (work) ------/
   /---------- "On a clear disc you can seek forever" ----------/
Technical Details
Message-ID: <dagraham.713448071@unix1.tcd.ie>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!ieunet!tcdcs!unix1.tcd.ie!dagraham
References: <1992Aug7.122345.7136@nestroy.wu-wien.ac.at>

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.mac.databases
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!ieunet!tcdcs!unix1.tcd.ie!dagraham
From: dagraham@unix1.tcd.ie (David Graham)
Subject: Re: FileMaker Pro Question
Message-ID: <dagraham.713448071@unix1.tcd.ie>
Sender: usenet@cs.tcd.ie (NN required at ashe.cs.tcd.ie)
Nntp-Posting-Host: unix1.tcd.ie
Organization: Just enough to get by
References: <1992Aug7.122345.7136@nestroy.wu-wien.ac.at>
Date: Mon, 10 Aug 1992 12:01:11 GMT
Lines: 49