Question

This is probably a simple solution but I am just trying out LightSwitch for the first time. The problem that I am running into is that I have a table called Job that needs 2 employees tied to it. There are 2 types of employees, Operators and Auditors defined in the EmployeeTypes Table. In my Jobs table I am trying to add the related table employees twice and have it only accept the certain type of employee. I hope this makes sense, to clarify I have added a screenshot of how it is working now, and how I want it to work.

How would I go about doing this? The only way I know how to do it at the moment through lightswitch is to create a table for each employee type, but this seems counter-productive and a bad way to design the database because the only difference in each employee type is the employeetype itself. Please let me know if you have any ideas on how this would work.

Screenshot

Was it helpful?

Solution

Alright this was just a case of not knowing how to use the interface correctly. To get this to work I left the table exactly how it is. On the Screen editor, I removed the two employee data fields and replaced them with two new data items where you can specify which query to bind them to.

Solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top