CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ColdFusion

 inserting foreign key from detail page record insert

Print topic Send  topic

Author Message
bpowers27

Posts: 1
Posted: 03/22/2007, 12:01 PM

I have a master/detail set of pages for a small application that lets instructors manage the textbook adoptions for their courses. They first enter general adoption list info (course name, sections). Then proceed to enter a book list for that adoption record.

Master page is a list from table adoptions. Primary key is adoptionID.

Detail page is a list from table adoptionBooks. Primary key is adoptionBookID. Foreign key is adoptionID.

It works to edit data. However, if I am on the detail page and go to add a new book record, it only works if I make the foreign key field a text box and users type it in. If I make it a label, the insert fails (I am guessing because the field is not being sent in, or is being sent in blank).

How can I set it up so once you are on the detail page, and you add a new book record, it carries into the insert the adoptionID (foreign key)?
View profile  Send private message
E43509

Posts: 283
Posted: 04/02/2007, 9:51 AM

Put the foreign key on the detail form as a hidden record.
In the before insert event, populate it for them.

View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.