hominid4
Member
Hi. I?ve been working on an employee timesheet and on one portion of the form it needs to check if the date the timesheet is being submitted is a holiday date or not. And there?s different holidays depending on the ?Client?.
Not sure if this is the correct route, but what I first did was create a Client account list (portal_clients_accounts) that has a User element that pulls the user IDs of the Client group I have set up.
I then created a ?Holiday List? list (portal_holidays_list) which contains all holidays for all clients; no dates in this table.
I then created a ?Holiday Dates? list (portal_holidays_dates) that will be populated with all the holidays future dates.
Then created a client holiday relationship table (portal_client_holidays), and this is a List joined to the ?portal_clients_accounts? list. And contains a "holiday_id" database join to the "portal_holidays_list" table. When creating the Client using the ?portal_clients_accounts? form, the holidays for that specific client is selected. I first did "portal_holidays_list" join as checkboxes but it created a ?portal_client_holidays_repeat_holiday_id? table and I wasn?t sure how to do a cascading dropdown (if needed) pulling that data. So for now, I have it as a repeat group list join dropdown.
When submitting the timesheet form, the idea is to select select the client (each employee will have several clients to choose from), it?ll check which holidays are assigned to that client, and then check the ?portal_holidays_dates? list to see if that today?s date is a holiday, and then in a text field it?ll insert a holiday code from another table I?ll have set up (haven't got to that point yet).
My thought would be to have:
Element: Employee Name (database join to employees account table)
Element: Client Name (cascading dropdown pulling from ?portal_clients_accounts? base on employee chosen)
Element: Client Holidays (cascading dropdown pulling from ?portal_client_holidays? based on chosen client)
At this point I?d thought I have a cascading dropdown pulling from ?portal_holidays_dates? but it only pulls one date depending on what holiday_id is selected in ?Client Holidays? above.
Is it possible to get to the ?Client Holidays? part where it pulls all the holiday_ids of that specific client, and then do a check with the ?portal_holidays_dates? table to see if any of those holiday_ids match up without having another cascading dropdown?
I?ve attached my tables for this portion of the form if that helps.
Thanks for any push in the right direction.
Joomla 3.3.x
Fabrik: 3.2 latest Github
Not sure if this is the correct route, but what I first did was create a Client account list (portal_clients_accounts) that has a User element that pulls the user IDs of the Client group I have set up.
I then created a ?Holiday List? list (portal_holidays_list) which contains all holidays for all clients; no dates in this table.
I then created a ?Holiday Dates? list (portal_holidays_dates) that will be populated with all the holidays future dates.
Then created a client holiday relationship table (portal_client_holidays), and this is a List joined to the ?portal_clients_accounts? list. And contains a "holiday_id" database join to the "portal_holidays_list" table. When creating the Client using the ?portal_clients_accounts? form, the holidays for that specific client is selected. I first did "portal_holidays_list" join as checkboxes but it created a ?portal_client_holidays_repeat_holiday_id? table and I wasn?t sure how to do a cascading dropdown (if needed) pulling that data. So for now, I have it as a repeat group list join dropdown.
When submitting the timesheet form, the idea is to select select the client (each employee will have several clients to choose from), it?ll check which holidays are assigned to that client, and then check the ?portal_holidays_dates? list to see if that today?s date is a holiday, and then in a text field it?ll insert a holiday code from another table I?ll have set up (haven't got to that point yet).
My thought would be to have:
Element: Employee Name (database join to employees account table)
Element: Client Name (cascading dropdown pulling from ?portal_clients_accounts? base on employee chosen)
Element: Client Holidays (cascading dropdown pulling from ?portal_client_holidays? based on chosen client)
At this point I?d thought I have a cascading dropdown pulling from ?portal_holidays_dates? but it only pulls one date depending on what holiday_id is selected in ?Client Holidays? above.
Is it possible to get to the ?Client Holidays? part where it pulls all the holiday_ids of that specific client, and then do a check with the ?portal_holidays_dates? table to see if any of those holiday_ids match up without having another cascading dropdown?
I?ve attached my tables for this portion of the form if that helps.
Thanks for any push in the right direction.
Joomla 3.3.x
Fabrik: 3.2 latest Github
Attachments
-
portal_clients_accounts.jpg30 KB · Views: 192
-
portal_holidays_list.jpg33.8 KB · Views: 185
-
portal_holidays_dates.jpg24 KB · Views: 198
-
portal_client_holidays.jpg18.9 KB · Views: 197
-
timesheet_form_01.jpg35.6 KB · Views: 203
-
timesheet_form_02.jpg34.7 KB · Views: 207
-
timesheet_form_03.jpg38.4 KB · Views: 179