Add additional fields for Lookup
-
- Posts: 1
- Joined: 2015-05-28 20:57
Add additional fields for Lookup
Hello, I am wanting to additional fields in my create function for employees. My employees can belong to many locations and my locations can have many employees. When i created the lookup field I can only select one location. How can i create an additional field dynamically to add an additional location after the first is selected?
Re: Add additional fields for Lookup
Sounds like you need to redesign your data structure.
ie, you already have an Employees table and a Locations table.
Since you have a many-to-many relationship between these, you would create another table, ie EmployeeLocations, which would contain the primary key from Employees and primary key from Locations.
You could then have as many records in this table as you need for each employee - so it becomes a child table of Employees and a child table of Locations
ie, you already have an Employees table and a Locations table.
Since you have a many-to-many relationship between these, you would create another table, ie EmployeeLocations, which would contain the primary key from Employees and primary key from Locations.
You could then have as many records in this table as you need for each employee - so it becomes a child table of Employees and a child table of Locations
-
- Veteran Member
- Posts: 67
- Joined: 2015-06-06 12:10
Re: Add additional fields for Lookup
Firstly, sorry to revive this topic from the dead - I don't usually dabble in Necromancy, but this is relevant to my issue and I couldn't find a more recent one.
I get the intersection table with the two Primary Keys from the tables, simple to build in the AppGini editor - but how does this actually work in practice within the AppGini app?
Can someone explain the next step for me please? I have a lookup on my "Employees" table and one on my "Locations" table - I'm pretty confused about what happens next - how does this help me with an employee having multiple locations?
Thank you in advance,
A. Dumbass
I get the intersection table with the two Primary Keys from the tables, simple to build in the AppGini editor - but how does this actually work in practice within the AppGini app?
Can someone explain the next step for me please? I have a lookup on my "Employees" table and one on my "Locations" table - I'm pretty confused about what happens next - how does this help me with an employee having multiple locations?
Thank you in advance,
A. Dumbass
