![]() |
romaldus 11/20/2016 |
I am working with a third party database and I can't modify it. The customer table has various columns (Name, FullName, CompanyName, ParentRef_FullName) which are used to establish relationships between companies. I need to select a value from the ParentRef_FullName column based on the user selection from the CompanyName column (selection is made using a dropdown showing unique values in the CompanyName column) and write the selected value to row being added to the table. Something along the lines of: $values["ParentRef_FullName"]= SELECT customer.ParentRef_FullName FROM customer WHERE customer.CompanyName = $values["CompanyName"] AND Sublevel = 2;A company name will appear several times in the CompanyName column, however it is only the value in ParentRef_FullName WHERE Sublevel=2 that we want to select. I want to accomplish this without the user having to select the 'correct' ParentRef_FullName in a dropdown - too many opportunities for errors. What is the best/easiest way to accomplish this? I'm assuming it needs to be in the Before record added event (after user selects CompanyName)? Thank you for your assistance!
|
R
|
rgfischerjr author 11/21/2016 |
[/quote] |
![]() |
Sergey Kornilov admin 11/22/2016 |
|