This topic is locked
[SOLVED]

 Client Details

11/14/2012 4:02:12 PM
PHPRunner General questions
thevillage author

I am a florist.
I am trying to replace a program I wrote in access years ago with phpRunner. What I am trying to accomplish is when I am adding a new order and I type in the sending florist code number, I wish it display the sending florists details on the page so I can confirm information such as the name and phone number of the sending florist.
The database that stores the order information is Order Log which contains field FloristCode

The database that stores the florist information is Florist Directory which contains the fields FloristCode, FloristName, FloristPhone.
I have the following databases linked based by FloristCode
My add to Order Log form's first field request the sending florist Code number (FloristCode)

The second field I want to display the Florist's name (FloristName) based on entry of first field and I don't want this field to be editable.

The third field would be the florists phone number (FloristPhone) and also does not need to be editable. (Note: at a later time i would follow this info with a button allowing me to change florist details)
The Forth and following fields are used to gather information about the order.
I know I can set the 2nd and 3rd fields to read only but how to I update their values to reflect name and phone number after the code number has been entered in first field? Is there an event i can add to do this?
The Village Greenery Florist

thevillage author 11/15/2012

Me again.
Figured how to accomplish the above problem by using the autofill function for the FloristCode lookup.
The form now displays the FloristName and FloristPhone when I enter the FloristCode.
However after I fill in the rest of the form when I go to save the record I get the following error message:
<<< Record was NOT added >>>
Unknown column 'FloristName' in 'field list'
Any ideas how to get around this error?
Thank You

The Village Greenery Florist

Sergey Kornilov admin 11/15/2012

If you display fields from joined tables on your Add/Edit form use BeforeAdd/BeforeEdit events to unset() those fields. Specifically you can use the following in your BeforeAdd event:

unset($values["FloristName"]);


More info:

http://xlinesoft.com/phprunner/docs/update_multiple_tables.htm

thevillage author 11/16/2012



If you display fields from joined tables on your Add/Edit form use BeforeAdd/BeforeEdit events to unset() those fields. Specifically you can use the following in your BeforeAdd event:

unset($values["FloristName"]);


More info:

http://xlinesoft.com/phprunner/docs/update_multiple_tables.htm


Thank You
Problem solved