dbTalk Databases Forums  

Can I fill a value list with 'field names' form a table?

comp.databases.filemaker comp.databases.filemaker


Discuss Can I fill a value list with 'field names' form a table? in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Wes
 
Posts: n/a

Default Can I fill a value list with 'field names' form a table? - 10-18-2005 , 01:14 PM






Is it possible to fill a value list with the field names from another
table? I'm interested in doing this dynamically, so that if I need to
add some fields in that particular table, the main table will adopt
the text field names automatically. I'm doing this as a way of
matching questions being asked, to fields that match each answer in
another table.

------------------------
Wes
http://www.LostPants.com

Reply With Quote
  #2  
Old   
Wes
 
Posts: n/a

Default Re: Can I fill a value list with 'field names' from a table? - 10-18-2005 , 01:15 PM






er.. that would be FROM

------------------------
Wes
http://www.LostPants.com

Reply With Quote
  #3  
Old   
Wes
 
Posts: n/a

Default Re: Can I fill a value list with 'field names' form a table? - 10-18-2005 , 01:19 PM



On Tue, 18 Oct 2005 11:14:38 -0700, Wes <wchester (AT) lostXXXpants (DOT) com>
wrote:

Quote:
Is it possible to fill a value list with the field names from another
table? I'm interested in doing this dynamically, so that if I need to
add some fields in that particular table, the main table will adopt
the text field names automatically. I'm doing this as a way of
matching questions being asked, to fields that match each answer in
another table.
I'm using FM 7 Developer.

------------------------
Wes
http://www.LostPants.com


Reply With Quote
  #4  
Old   
Howard Schlossberg
 
Posts: n/a

Default Re: Can I fill a value list with 'field names' form a table? - 10-18-2005 , 01:23 PM



Wes wrote:
Quote:
Is it possible to fill a value list with the field names from another
table? I'm interested in doing this dynamically, so that if I need to
add some fields in that particular table, the main table will adopt
the text field names automatically. I'm doing this as a way of
matching questions being asked, to fields that match each answer in
another table.
Put all the fields you want on a particular layout. Create a stored
calc field that is:
FieldNames ( Get(FileName) ; layoutName )

Or you can specify a table name instead of the layout name if you just
want to list all fields in the table.

Base your value list on this calc field.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Pro Solutions Los Angeles, California

FileMaker 7 Certified Developer
Associate Member, FileMaker Solutions Alliance


Reply With Quote
  #5  
Old   
FP
 
Posts: n/a

Default Re: Can I fill a value list with 'field names' form a table? - 10-18-2005 , 07:53 PM




Howard Schlossberg wrote:
Quote:
Put all the fields you want on a particular layout. Create a stored
calc field that is:
FieldNames ( Get(FileName) ; layoutName )

Or you can specify a table name instead of the layout name if you just
want to list all fields in the table.

Base your value list on this calc field.
If you make this field a calculation field then it needs to be stored
which means it will calculate once and contain a list of all the fields
you have at that time; any fields you add after that won't be included
in the calculation.
You might be better off setting a text field in a table that has only 1
record to this calculation result and then base your value list on that
field. You could then always set the field on startup and after you've
added fields this way it should stay up to date.



Reply With Quote
  #6  
Old   
Matt Wills
 
Posts: n/a

Default Re: Can I fill a value list with 'field names' form a table? - 10-24-2005 , 06:13 PM



Wes wrote on (10/18/2005):

Quote:
On Tue, 18 Oct 2005 11:14:38 -0700, Wes <wchester (AT) lostXXXpants (DOT) com
wrote:

Is it possible to fill a value list with the field names from another
table? I'm interested in doing this dynamically, so that if I need to
add some fields in that particular table, the main table will adopt
the text field names automatically. I'm doing this as a way of
matching questions being asked, to fields that match each answer in
another table.

I'm using FM 7 Developer.

------------------------
Wes
http://www.LostPants.com

Create a global calc field:

gYourFields = FieldNames ( Get (FileName) ;"Your Layout Name" ).

Define a value list to take its values from gYourFields.

Matt

--



Reply With Quote
  #7  
Old   
Matt Wills
 
Posts: n/a

Default Re: Can I fill a value list with 'field names' form a table? - 10-24-2005 , 06:23 PM



Matt Wills wrote on (10/24/2005):

Quote:
Wes wrote on (10/18/2005):

On Tue, 18 Oct 2005 11:14:38 -0700, Wes <wchester (AT) lostXXXpants (DOT) com
wrote:

Is it possible to fill a value list with the field names from another
table? I'm interested in doing this dynamically, so that if I need to
add some fields in that particular table, the main table will adopt
the text field names automatically. I'm doing this as a way of
matching questions being asked, to fields that match each answer in
another table.

I'm using FM 7 Developer.

------------------------
Wes
http://www.LostPants.com


Create a global calc field:

gYourFields = FieldNames ( Get (FileName) ;"Your Layout Name" ).

Define a value list to take its values from gYourFields.

Matt
I spoke too soon.

You won't get the value list from a global because it can't be indexed. It
would have to be a regular field.

You could simulate global in a regular field by doing the calc field in a
table with just one record in it.

Matt

--



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.