This topic is locked

display another value

11/5/2010 8:04:18 AM
PHPRunner General questions
J
jasonfrew author

Im my application i have a field that is a customer id. i use a look up field to populate this. The look up field populates the database with one value (a referance no) but displays the name of the customer attached to the number.
this is set up using the facilitys allready built into php runner 5.3
i have another table in the database that uses a similar process for the customer id. however in this table im using a look up table and auto fill to complete most of the form. one of the fields im completing is the customer id field. when i use the lookup table and auto fill i see the customer id and not the customer name
Can anyone help?

Sergey Kornilov admin 11/5/2010

Not 100% sure I understand what you up to but here we go.
You can setup that second field as a dropdown as well and make it dependent on first dropdown box. In this case it will be filled automatically and you have an option to select different Link and Display fields.

J
jasonfrew author 11/5/2010

Ok ill try make it clearer
jobs_add.php contains a field "customer"
the customer field uses a look up table to populate its self.
jobs_add.php also has a field "Quote No"
if your adding a job without having previously had a quote, the process is complete the form and save. When you select the customer form the look up table, the value it enters into the database is the customer unique reference. however the value it displays on the page is the customer name.
If however you have already a quote in the application you would use the look up table on the quote field. when you select your quote the auto fill completes the form. one of the fields the auto fill completes is the "customer " field. what happens then is the unique reference number is displayed and not the customer name.
I would like only to have the customer field display the customer name but save the customer unique reference number in the database.

Sergey Kornilov admin 11/6/2010

I would suggest to make "customer" field a lookup wizard choosing "customer unique reference" as a link field and "customer name" as a display field.

J
jasonfrew author 11/8/2010

This is how this field has been created. however it is also included in the auto fill process when the auto fill completes the field it shows the customer number and not the customer name

Sergey Kornilov admin 11/8/2010

You can exclude it from Autofill list and make it a dependent dropdown box.

J
jasonfrew author 11/9/2010



You can exclude it from Autofill list and make it a dependent dropdown box.


I would like to include it in the autofill selection

Sergey Kornilov admin 11/9/2010

Autofill won't let you have different Link and Display fields. Dependent dropdown will and it works exactly the way you need it.