Jump to content

[FP5] Generating a value list from field entries


Chris@Knysna
 Share

This topic is 6500 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

I am trying to generate a value list from field entries. Here's the scenario:

1. I have a 'customisation'-layout with 10 fields declared as (text) variables: They're named 'Unit1_description', 'Unit2_description' etc. .

2. In this layout I also have a calc-field named 'Unit-list'. It has a formula which concatenates the entries in the unit description fields into a list.

3. On a separate 'manager' layout (the one for specifying the actual DB records) I have a field pointing to a value list called 'Unit_descriptions'.

4. 'Unit_descriptions' is set to import its contents from the calc-field 'Unit_list'.

BUT: it won't. When I try to select something from this value list FM tells me that the 'index does not exist' (don't know whether this is the exact error message you'd get in an English FM version; I am working with a German version which reports 'Index nicht vorhanden'). Obviously, 'Unit_list' is generated from variables and thus not indexed - which is why the routine works when I set the 'Unit_description' fields to Text property. But that defeats the purpose since these values are not record specific.

Is there a simple solution to this problem? I'd love to keep this in one DB.

Thanks!

Chris

FileMaker Version: 5

Platform: Windows XP

Link to comment
Share on other sites

I can't remember with version 5 what is and isn't do-able with value lists, so my appologies if the following are not options for you.

It sounds like your Unit1_description, Unit2_description, etc fields are global fields. Is that right? If so, you cannot index them or calculations that use them.

Try making a second file. Call it "Descriptions.Fp5" Then, do one of two things:

Add all your fields (Unit1_description, Unit2_description, etc) as regular text fields then create your Unit-list based on them. Then, define your value list to use values from a field, and specify the Descriptions file and the Unit-list field.

OR

Add single field called Description then create a separate record for each Unit. Then, define the value list to use the Description field from the Descriptions.fp5 file.

Jeff

Link to comment
Share on other sites

  • Newbies

Jeff,

thanks - I had already tried your option 1 and it works, as expected! Option 2 might be even better because this should allow me to call up unit-specific details (such as price, season etc.; 'unit' refers to rooms in a B&: from the descriptions file as well.

Still ... it really puzzles me that value lists cannot be generated directly from global variables defined within the same DB. I mean, what IS a value list other than just that: a global variable?

Chris

Link to comment
Share on other sites

This topic is 6500 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.