This topic is locked
[SOLVED]

 Populating the $values array

1/20/2011 5:19:38 PM
PHPRunner General questions
P
procheck author

Hi,
I add records using a picklist on field ID. The Link field is ID and this is the only field which is checked for Inline Add & Inline edit on the FIELDS Page. For this reason, the $values array is not populated with all of the results which are retrieved from a joined table. I need to validate one of the fields which is retreived. Now I can do this with a simple SELECT statement which works fine in BeforeAdd.
Is there a way to populate the $values clause without running the extra SELECT. It's not a big deal if there isn't a way but if I can save processing time then that would be best.
Thanks
Al

Sergey Kornilov admin 1/20/2011

$values array consists of fields that will be written to the database. It cannot contain field from joined table as Insert/Update can be run against a single table only.
Explain what you trying to achieve and we'll suggest a workaround.

P
procheck author 1/21/2011

Hi Sergey,
I do have it working by running a SELECT on the table based on the results of what was chosen in the dropdown list. I just wanted to make sure that I wasn't missing something. You've answered my question.
Thanks