Yet another conditional value list question 
Author Message
 Yet another conditional value list question

Hi:

I'm trying get a field to use one of two value lists based on a value set
when the user starts the DB for the FIRST time (i.e., the DB will have
contain one blank record when the user makes this choice).  In other
words, once the choice is made at the beginning, only one of the two value
lists will be used for all future work.  If this is not clear, let's
pretend this is a simple DB which will be used for dealing with fruits or
vegetables.

When the user starts the DB for the first time there will be a layout that
says: "Will you be working with Fruits or vegetables?" and a pop up list
or check box to chose from "fruit" or "vegetables."

On the main working layout there will be a field (FruitOrVegName)
formatted as a pop up list.   If the response on the first layout was
"fruit," then I want the field (FruitOrVegName) to use a value list that
contains a short list (6) of fruit names.  However, if the initial
response was "vegetables," then I want it to use a value list that has 6
vegetable names.

Without going into a lot of detail about what I've tried, I can tell you
that storing the six names in global fields and then using a calculation
to populate a third global field to be used as the source of the value
list doesn't work - or at least I couldn't get it to work.  It seems that
FMP says global fields can only store one value.  And a global repeating
field doesn't work either.  It would certainly be nice if FMPro would
allow you to define multiple "Custom" value lists.

Can anyone offer a relatively simple solution to this problem?  Using a
second DB as the source of the value list is out of the question due to
idiot proofing issues.  I guess I could define a regular text field to use
as the source of the value list and "auto-fill" it (based on a
calculation) with the six selections as each new record is created, but
that would just create dead weight for the file.  

Actually, since I really only need to chose from six values, an
alternative (among many others) would be to use six buttons, each linked
to a script that would "set" the target field with literal text based on a
calculation that looks at the original choice.

Still, a pop up field would conserve screen real estate and after all the
time I've spent trying to figure this one out, I'm curious as to whether a
solution exists.  BTW, I'm using FMP 3 right now but have access to FMP
4.1.  Would the ValueListItems function in FMP 4.1 help here?  The FMP 4.1
manual and help system are rather unhelpful regarding this function.

Thanks,

Bill



Tue, 19 Aug 2003 05:20:29 GMT
 Yet another conditional value list question

Filemaker 5 would give you the easiest solution, because it accomodates the
use of real conditional value lists, meaning that the change of a key-- in
this case the field in which the Fruit or Vegetable choice is made-- can be
used to control a relationship that can populate the value list.

The ValueListItems function returns a list of the items in a value list, but
it does not create such a list.

What you may be missing is that you can use one text field to create a value
list by separating the values with carriage returns. Those are not multiple
values, and can be entered into a global text field (this technique is used
all the time for multiline keys), or a regular text field. I must admit I
cannot remember if you can use a field to populate a value list in 3, but
I'm pretty certain you can. Thus, you can create that field on a layout that
is locked away, and use your three field scheme, i.e., if choice A, then set
Field C to Field A, Else Field B, where Field C will be used to populate the
value list.

--

John Weinshel
Datagrace
Associate Member, Filemaker Solutions Alliance
Vashon Island, WA
(206) 463-1634


Quote:
> Hi:

> I'm trying get a field to use one of two value lists based on a value set
> when the user starts the DB for the FIRST time (i.e., the DB will have
> contain one blank record when the user makes this choice).  In other
> words, once the choice is made at the beginning, only one of the two value
> lists will be used for all future work.  If this is not clear, let's
> pretend this is a simple DB which will be used for dealing with fruits or
> vegetables.

> When the user starts the DB for the first time there will be a layout that
> says: "Will you be working with Fruits or vegetables?" and a pop up list
> or check box to chose from "fruit" or "vegetables."

> On the main working layout there will be a field (FruitOrVegName)
> formatted as a pop up list.   If the response on the first layout was
> "fruit," then I want the field (FruitOrVegName) to use a value list that
> contains a short list (6) of fruit names.  However, if the initial
> response was "vegetables," then I want it to use a value list that has 6
> vegetable names.

> Without going into a lot of detail about what I've tried, I can tell you
> that storing the six names in global fields and then using a calculation
> to populate a third global field to be used as the source of the value
> list doesn't work - or at least I couldn't get it to work.  It seems that
> FMP says global fields can only store one value.  And a global repeating
> field doesn't work either.  It would certainly be nice if FMPro would
> allow you to define multiple "Custom" value lists.

> Can anyone offer a relatively simple solution to this problem?  Using a
> second DB as the source of the value list is out of the question due to
> idiot proofing issues.  I guess I could define a regular text field to use
> as the source of the value list and "auto-fill" it (based on a
> calculation) with the six selections as each new record is created, but
> that would just create dead weight for the file.

> Actually, since I really only need to chose from six values, an
> alternative (among many others) would be to use six buttons, each linked
> to a script that would "set" the target field with literal text based on a
> calculation that looks at the original choice.

> Still, a pop up field would conserve screen real estate and after all the
> time I've spent trying to figure this one out, I'm curious as to whether a
> solution exists.  BTW, I'm using FMP 3 right now but have access to FMP
> 4.1.  Would the ValueListItems function in FMP 4.1 help here?  The FMP 4.1
> manual and help system are rather unhelpful regarding this function.

> Thanks,

> Bill




Tue, 19 Aug 2003 12:33:03 GMT
 Yet another conditional value list question

Quote:

> Filemaker 5 would give you the easiest solution, because it accomodates the
> use of real conditional value lists, meaning that the change of a key-- in
> this case the field in which the Fruit or Vegetable choice is made-- can be
> used to control a relationship that can populate the value list.

FMP 5 isn't a solution right now because I'm designing this DB for a
non-profit organization.

Quote:
> The ValueListItems function returns a list of the items in a value list, but
> it does not create such a list.

> What you may be missing is that you can use one text field to create a value
> list by separating the values with carriage returns. Those are not multiple
> values, and can be entered into a global text field (this technique is used
> all the time for multiline keys), or a regular text field. I must admit I
> cannot remember if you can use a field to populate a value list in 3, but
> I'm pretty certain you can. Thus, you can create that field on a layout that
> is locked away, and use your three field scheme, i.e., if choice A, then set
> Field C to Field A, Else Field B, where Field C will be used to populate the
> value list.

I think this is exactly what I did.  I tried both return separated values
and repeats in the global field(s), and the target (pop up) field would
just NOT pop!  If I changed the field definition from a global to a
"regular" text field, the pop up would work fine.  This suggested to me
that global fields containing multiple return separated values won't work
as a value list.  I suspect Filemaker, Inc designed this limitation into
globals to prevent problems with networked DBs (the old global-global
versus loca-global issue).

Thank you for your help, John.  I've got tons of your posts saved and have
learned a lot from you and many others on this NG.

Bill

Quote:



> > Hi:

> > I'm trying get a field to use one of two value lists based on a value set
> > when the user starts the DB for the FIRST time (i.e., the DB will have
> > contain one blank record when the user makes this choice).  In other
> > words, once the choice is made at the beginning, only one of the two value
> > lists will be used for all future work.  If this is not clear, let's
> > pretend this is a simple DB which will be used for dealing with fruits or
> > vegetables.

...snip...


Wed, 20 Aug 2003 02:20:04 GMT
 Yet another conditional value list question
A global field cannot itself be used as the source of the value list,
because it cannot be indexed. I expect you would get an error message to
that effect. But the global should be able to temporarily hold the list, and
then pass it, as part of the decision tree in the script, to the text field
that is being used to populate the value list.

In other words, you should be using a script that asks the user to make the
choice you describe (while the script pauses), and then, using the choice
the user has made, performs a Set Field, setting the text field (that is
used for the value list) to the global. You should have two globals, each
with their separate lists (Fruits or Vegetables), and whichever one is
chosen is the one that gets passed to the text field.

Thank you for your kind words.
--

John Weinshel
Datagrace
Associate Member, Filemaker Solutions Alliance
Vashon Island, WA
(206) 463-1634


Quote:


> > Filemaker 5 would give you the easiest solution, because it accomodates
the
> > use of real conditional value lists, meaning that the change of a key--
in
> > this case the field in which the Fruit or Vegetable choice is made-- can
be
> > used to control a relationship that can populate the value list.

> FMP 5 isn't a solution right now because I'm designing this DB for a
> non-profit organization.

> > The ValueListItems function returns a list of the items in a value list,
but
> > it does not create such a list.

> > What you may be missing is that you can use one text field to create a
value
> > list by separating the values with carriage returns. Those are not
multiple
> > values, and can be entered into a global text field (this technique is
used
> > all the time for multiline keys), or a regular text field. I must admit
I
> > cannot remember if you can use a field to populate a value list in 3,
but
> > I'm pretty certain you can. Thus, you can create that field on a layout
that
> > is locked away, and use your three field scheme, i.e., if choice A, then
set
> > Field C to Field A, Else Field B, where Field C will be used to populate
the
> > value list.

> I think this is exactly what I did.  I tried both return separated values
> and repeats in the global field(s), and the target (pop up) field would
> just NOT pop!  If I changed the field definition from a global to a
> "regular" text field, the pop up would work fine.  This suggested to me
> that global fields containing multiple return separated values won't work
> as a value list.  I suspect Filemaker, Inc designed this limitation into
> globals to prevent problems with networked DBs (the old global-global
> versus loca-global issue).

> Thank you for your help, John.  I've got tons of your posts saved and have
> learned a lot from you and many others on this NG.

> Bill



> > > Hi:

> > > I'm trying get a field to use one of two value lists based on a value
set
> > > when the user starts the DB for the FIRST time (i.e., the DB will have
> > > contain one blank record when the user makes this choice).  In other
> > > words, once the choice is made at the beginning, only one of the two
value
> > > lists will be used for all future work.  If this is not clear, let's
> > > pretend this is a simple DB which will be used for dealing with fruits
or
> > > vegetables.

> ...snip...



Wed, 20 Aug 2003 03:52:23 GMT
 
 [ 4 post ] 

 Relevant Pages 

1. Value list - conditional

2. Conditional value list

3. Conditional Value list

4. Conditional Value List

5. Sorting a conditional value list.

6. conditional value list

7. Problems with conditional value list and layout

8. Conditional value list - FP5

9. Multiple conditional value lists - can it be done?

10. Conditional Value Lists using CDML?

11. conditional value list with CDML (FM 5) - please help

12. Conditional Value List 5 vs. 4


 
Powered by phpBB® Forum Software