Re: Query regarding the Check Box field
- From: Helpful Harry <helpful_harry@xxxxxxxxxxxxxxxx>
- Date: Tue, 05 Jul 2005 18:54:17 +1200
In article <BEEEE6BB.8297%nick@xxxxxxxxxxx>, Nick Marshall
<nick@xxxxxxxxxxx> wrote:
>
> I am trying to display a number of results from a Case command in a Check
> Box field and I¹m experiencing some problems.
>
> What I want to happen is when a date is entered into a field (sampledate_1)
> an ³x² is automatically entered into a Check Box field (called
> results_check) next to the relevant field title. Then, when another date is
> entered into another one of the date fields (sampledate_2), another ³x² is
> marked next to the relevant ³results_check² field, and so on until they¹re
> all checked.
>
> I¹m unsure as to what calculation I will need to use as the Case command
> only seems to display 1 true result at a time.
You could use separate fields for each checkbox, then each is a simple
calculation field:
ResultsCheck_X {Calculation, Text result}
= If (IsEmpty(SampleDate_X), "", "Check")
where "Check" is whatever value the checkbox uses when it's turned "on".
If you want to use one field for all the checkboxes, then you need to
understand how checkbox fields work. A 'checkbox' field is really just
a normal field set to display it's data in a different format - the
field contains each "on" value separated by a Return character. You can
see how they work by duplicating the checkbox field and making it use
"Normal" format, then try turning different checkboxes on and off and
see what is displayed in the normally formatted version.
Getting back to the original problem, to get each value in the
multiple-checkbox field to turn "on" when a date is entered in another
field you could use something like:
ResultsCheck {Calculation, Text result}
= If (IsEmpty(SampleDate_1), "", "Check_1¶")
& If (IsEmpty(SampleDate_2), "", "Check_2¶")
& If (IsEmpty(SampleDate_3), "", "Check_3¶")
& If (IsEmpty(SampleDate_4), "", "Check_4¶")
& ...
& If (IsEmpty(SampleDate_X), "", "Check_X")
where "Check_Y" are the appropriate values of the checkbox options and
the ¶ character is the Return character that's on one of the buttons in
the Define Calculation window.
Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)
.
- Prev by Date: Startup database in FM7 in a maximized window
- Next by Date: Re: Keyboard shortcuts
- Previous by thread: Re: Query regarding the Check Box field
- Next by thread: FM5 - adding a year to a date, or several years
- Index(es):
Relevant Pages
|