This topic is locked

show result from other field value

9/23/2010 11:30:41 AM
PHPRunner General questions
T
tedwilder author

hello in event Before record added , I would like to do an sql request but I dont know what to do..

I have a user table. Each user is part of a group and One user on each group as the "admin field " to Y.

I want when I record a new entry , when I pick the user name from a lookup table that in the Field admin user the correct admin of this user that is part of the same group shows up autopmaticly.

example : user jack is member of marketing team . User Ted is member of marketing too with admin right. I want when I choose Jack on lookup, that the next field ( Admin name of this user) to be filled with the name of Ted.
So I can get the ID user with echo $values["iduser"]; ( to get JAck id) but then I dont know how to get the userid of Ted .. In fact I need to do a $sql with select user.* where group = "$value from the user ted " and Admin = Y ..

if you have any idea..

thank you.

A
ann 9/24/2010

Hi,
you can set up 'Admin' field as dependent dropdown on the Lookup wizard tab on the Edit as settings dialog on the Visual Editor tab.

More information in the 'How to setup dependent dropdown boxes on Edit/Add pages' video tutorial:

http://xlinesoft.com/phprunner/php-database.htm