Multiple selection for lookup field

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
fdaghmash
Posts: 2
Joined: 2014-11-23 10:14

Multiple selection for lookup field

Post by fdaghmash » 2014-11-24 20:20

Hello Everyone,

I've a question if anyone can help please, I've a table called training sessions and I am linking the attendees from employees table. I need to know how to change this lookup data into multiple selection. I can see that in Option list but not in the looked-up data. Any help?

Regards,
Firas

primitive_man
AppGini Super Hero
AppGini Super Hero
Posts: 54
Joined: 2014-03-09 20:20

Re: Multiple selection for lookup field

Post by primitive_man » 2014-12-16 11:31

The Problem is that you have a many-2-many relationship here.
Many employees can attend Many sessions.
Because you have a many-2-many relationship, I assume you've created a 'Link' Table (also called a Join Table):
Employee_ID - Session_ID -> (Link Table) Employee_FK-Session_FK

ID fields come from their respective tables and the FK fields are foreign keys within the Link table.
Because they are foreign keys, they must have the same datatype has the ID fields (INT, Unsigned) - Integer fields do NOT allow multiple values(which are required for a multiple select) - for that you'd need a Text Field or Blob field type which would negate the use of the Link Table and make your database unsound.

I'm afraid that Appgini doesn't allow you to do what you require - it strictly enforces good database design. So I'm afraid that you'll have to individually assign each employee to a training session.

Post Reply