Both tables are related with "employee_ID". Employee table is primary & payroll table is foreign.
The Pop-up menu for the payroll table is the foreignkey_employeeID with a value of my employees' prefer nickname that I created.
I suggest what I call a "hardwired conditional value list". It uses a condition set by the database design rather than a user's choice to set up a conditional value list.
You can find 2 different ways to set up such a Hardwired CVL plus 8 other approaches to a CVL in:
Thank you~ I will check it.
I followed your Basic Conditional Value Lists from Adventure 1, and create a database for test but it doesn't work. I think I might make some mistakes that I am not aware of.
My test database contains two tables: Employee and Payroll
Employee table has only three fields:
- __pkEmployeeID (NumberType with serial number enable)
- Name (Text)
- Status (Text)
Payroll table has only two fields:
- _fkEmployeeID (number type)
- Status (Text)
I created three records in employee tables: two records with the "active" status, and one with "inactive" status.
In the Payroll table, I only want the active employees to be visible in the pop-up menu list. But It seems not working.
Here is the database that I created for your reference.
Could you please help me clarify where I did wrong?
I'm a bit puzzled as to why you chose to implement the "basic" conditional value list instead of one the "hardwired" conditional value list methods that I recommended.
If you are going to use the "basic" method, you will need to assign the correct value to Status in PayRoll and then the value list much be set up to "include only related values, starting from Payroll."
The hardwired options eliminate the need to make sure that Status, in the payroll table has the correct value.
I see. Let me look into it.
I followed your Hardwired conditional value lists and using Calculation field only option.
It seems working but I think something is still missing.
Here is my current payroll database that I'm using for my employees for your reference.
I changed my 13th employee's status to "inactive" for testing. If you go to "payroll" table and click the employee pop-up menu, it seems when the employee's status is "inactive", his/her name will not be visible, but their employee ID is still showing.
What should I do to make both of the employee ID and the name disappear when the status in inactive?
I still need the relationships between TO of employees, cash advance, and expense because I wanna show related pending expenses or cash advance when I do the payroll.
Sort the value list by the second field, the name field.
I tried that before but the pop-up menu will shown only one option as 001 ? ( see image below)