Table without Relation, how to call

Talk about foreign keys

Moderators: ne_moj, zewa, vadimako, ne_moj, zewa, vadimako

rssridhar17
Junior
Junior
Posts: 21
Joined: Dec 8th, '11, 05:01

Table without Relation, how to call

Postby rssridhar17 » Dec 20th, '11, 12:56

Hi,

Is there way to do this ?

for an Inventory system, I have 3 tables - Customer_Master, Delivery_Challan_Header, Delivery_Challan_details

While creating a Delivery challan,
Only 2 tables are related ( Delivery_Challan_Header, AND Delivery_Challan_details)
I am using customer_master to display the "customer_name" and "address" to the user while raising the Deliverychallan,
only the customer_code is captured in Delivery_Challan_Header table.

Is there any way that i call the third table (customer_master) values in a dropdown without joining the table.

Can we use it as foreign key ? Will this work ?
or Is there any other way around.

administrator
Site Admin
Site Admin
Posts: 5988
Joined: Jan 7th, '09, 23:18
Contact:

Re: Table without Relation, how to call

Postby administrator » Dec 21st, '11, 11:14

You may do it with using "enum" field.
Please find more info here:
viewtopic.php?f=33&t=3063

rssridhar17
Junior
Junior
Posts: 21
Joined: Dec 8th, '11, 05:01

Re: Table without Relation, how to call

Postby rssridhar17 » Dec 21st, '11, 12:31

Hi,

For the solution given, foreign key has to be from a table which is joined right ? Pl correct me if I am wrong.

I want values from the table which is not joined/set relation.

Is this possible. How to go about

administrator
Site Admin
Site Admin
Posts: 5988
Joined: Jan 7th, '09, 23:18
Contact:

Re: Table without Relation, how to call

Postby administrator » Dec 22nd, '11, 08:47

You may display any values, not only from related table.
You have to prefill array of values for "enum" field.

please read here (p.2.2):
viewtopic.php?f=33&t=1580


Return to “Field type: "foreign key"”