dbTalk Databases Forums  

Populating with related value

comp.databases.filemaker comp.databases.filemaker


Discuss Populating with related value in the comp.databases.filemaker forum.



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

Default Populating with related value - 07-05-2007 , 02:48 PM






I know I have seen this solved somewhere before, I just can't find
where, and as simple as this seems it should be, I'm just not getting
it.Tables:Product: a single one of a kind item per record,
CustomerIDCustomer: Individual customer's name,
CustomerID.Relationship is Product::CustomerID =
Customer::CustomerIDProblem:On the Product layout, the user wants
to select the purchaser from a dropdown displaying the names of all
customers. I need to use the CustomerID to relate the records, so I
want the selection of the name to result in the CustomerID being
placed in the proper (key) field.
Any help?Matt



Reply With Quote
  #2  
Old   
Matt WIlls
 
Posts: n/a

Default Re: Populating with related value - 07-05-2007 , 04:39 PM






Once again, a question asked before sufficiently researching the
situation with available materials.
Problem solved with Lookup properly configured.

Matt

In article <nemoThu070507034621 (AT) news (DOT) verizon.net> Matt
WIlls<Im (AT) Witz (DOT) End> wrote:

Quote:
I know I have seen this solved somewhere before, I just can't
findwhere, and as simple as this seems it should be, I'm just not
getting
it.

Tables:

Product: a single one of a kind item per record,
CustomerID
Customer: Individual customer's name,
CustomerID.

Relationship is Product::CustomerID =
Customer::CustomerID

Problem:

On the Product layout, the user wants
to select the purchaser from a dropdown displaying the names of all
customers. I need to use the CustomerID to relate the records, so I
want the selection of the name to result in the CustomerID
beingplaced in the proper (key) field.
Any help?

Matt






Reply With Quote
  #3  
Old   
Helpful Harry
 
Posts: n/a

Default Re: Populating with related value - 07-05-2007 , 07:36 PM



In article <nemoThu070507034621 (AT) news (DOT) verizon.net>, Matt WIlls
<Im (AT) Witz (DOT) End> wrote:

Quote:
I know I have seen this solved somewhere before, I just can't find
where, and as simple as this seems it should be, I'm just not getting
it.

Tables:

Product: a single one of a kind item per record,
CustomerID
Customer: Individual customer's name,
CustomerID.

Relationship is Product::CustomerID =
Customer::CustomerID

Problem:

On the Product layout, the user wants
to select the purchaser from a dropdown displaying the names of all
customers. I need to use the CustomerID to relate the records, so I
want the selection of the name to result in the CustomerID being
placed in the proper (key) field.
Any help?
It can be done by creating a second relationship using Customer Name as
the link / key field on both tables and then making the ID field an
Auto-enter by Calculation ... BUT names are often not unique, which is
why it's not usually a good idea to use them for relationships.

A better method would be to have the Value List for the dropdown on the
Products Layout to display both the Customer Name and ID (you can sort
the list by either field), then you can just grab the ID using an
Auto-enter Calculation via a Left or Right function depending on
whether the ID field is first or second.
eg.
Customer ID Text, Auto-enter by Calculation
= If (IsEmpty(DropDownField),
"",
Left(DropDownField, 3)
)


Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
  #4  
Old   
Chris Brown
 
Posts: n/a

Default Re: Populating with related value - 07-06-2007 , 04:05 AM



FMMatt WIlls wrote:
Quote:
I know I have seen this solved somewhere before, I just can't find
where, and as simple as this seems it should be, I'm just not getting
it.

Tables:

Product: a single one of a kind item per record,
CustomerID
Customer: Individual customer's name,
CustomerID.

Relationship is Product::CustomerID =
Customer::CustomerID

Problem:

On the Product layout, the user wants
to select the purchaser from a dropdown displaying the names of all
customers. I need to use the CustomerID to relate the records, so I
want the selection of the name to result in the CustomerID being
placed in the proper (key) field.
Any help?

Matt



FM8A

you can do this without a rel
2 tables, unrelated
TBL_A is the list of names and ID's

TBL_B has a Field Name, and NameID
create a VL and define the left panel to use all values , field A::ID
also display values from A::Name
and check only display values from second field


attach the VL to the NameID field in B
put 2 iterations of the Name ID field on the layout, one with the VL,
one without; to prove to yourself it works. The NameID iteration with
the VL, displays teh name, the NameID field without a VL, displays the ID.

I only fell over this a few weeks ago.


regards

Chris


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.