This topic is locked

Assigning equipment

6/6/2005 9:51:36 PM
PHPRunner General questions
prleo1 author

I have two tables - employees(emp_id) and equipment(equip_id +emp_id FK).

I need to be able to "assign" and "unassign" a piece of equipment to an employee, but I am unsure if I am able to do it somehow with PHPRunner.
Basically, I have to insert the emp_id of the employee into the emp_id(FK) for that particular piece of equipment to "assign" it, and set the emp_id of equipment to null in order to "unassign" it.
Can this be done in PHPRunner?

admin 6/7/2005

Hi,
key field can't be set as null.

Add record for "unassigned" employee in employees table.

Use lookup wizard for emp_id(FK) field to choose emp_id from employees table.

prleo1 author 6/13/2005

key field can't be set as null.

Add record for "unassigned" employee in employees table.

Use lookup wizard for emp_id(FK) field to choose emp_id from employees table.
So, you want me to add a column named unassigned in the employee table?
This is my tables.
Equipment Table

equip_id - pk

emp_id - fk

description
employees Table

emp_id - pk

full_name
Do I have to write a custom query to add the full_name and emp_id from the employees table to the list of equipment columns.

Could you be more descriptive as to what I do on the formatting page to be able to select the particular employee?

admin 6/14/2005

Hi,
you don't need to add a new column. Just add a new record to employees Table and enter full_name value as "unassigned" for example.

prleo1 author 6/14/2005

Admin!!!!
Thank you. It worked!!!