Answered
"SELECT" from Struct?
For a calendar application I have different structs:
The "DayStruct" that contains all assignments for the days of the month, e.g.
DayStruct - struct
19 322
25 321,319,318
which means on the 19th of the month for which this struct is valid (only one month shown in one request) I have 1 assignement on the 19th and three on the 25th.
Then the "SpecialDayStruct" which contains the days which can have more then one shift, e.g.:
SpecialDayStruct - struct
25 26
which means: on the 25th the specialday with the ID 26 is active.
In the specialday table is defined how many assignments and shifts are needed for this day.
Finally "AssignmentStruct" which contains the detailinfos to the assignement: whichb user is assigned to which shift:
AssignmentStruct - struct
318
AssignmentStruct - struct
assignment_shift 1
assignment_userfamilyname User
assignment_userfirstname Admin
assignment_userid 2
319
AssignmentStruct - struct
assignment_shift 1
assignment_userfamilyname Meier
assignment_userfirstname Herbert
assignment_userid 10
321
AssignmentStruct - struct
assignment_shift 2
assignment_userfamilyname User
assignment_userfirstname Admin
assignment_userid 2
322
AssignmentStruct - struct
assignment_shift 1
assignment_userfamilyname User
assignment_userfirstname Admin
assignment_userid 2
the text might not be that easy to understand.
An image with a screenshot including the cfdumps for the structs (on the 25th) is online at:
http://www.z-consulting.ch/calendar-example.gif
As you might see the 25th is a specialday which can have 3 shifts.
Assignments 318, 319, 321 are for this specialday whereby 318 and 319 are assigned to shift 1 ond 321 is in shift 2.
Now I loop to the assignments and only want to allow to add entries in each shift that has not yet reached the number of needed assignements (which is defined in #SpecialDaysStruct[SpecialDayStruct[DaysShown]]["specialday_neededassignements"]#)
The relevant code (with some commented out attempts is attached).
I just seem to turn in circles.
Any ideas on how to accomplish to restrict the "xfa.Enrol_for_Work" or "xfa.SelectPerson" respectively to only the cases where the "specialday_neededassignements" for the shift has not be reached?
Thanks for hints and help.
-------------------------------------------------------------------------------------------------------------------------
The "DayStruct" that contains all assignments for the days of the month, e.g.
DayStruct - struct
19 322
25 321,319,318
which means on the 19th of the month for which this struct is valid (only one month shown in one request) I have 1 assignement on the 19th and three on the 25th.
Then the "SpecialDayStruct" which contains the days which can have more then one shift, e.g.:
SpecialDayStruct - struct
25 26
which means: on the 25th the specialday with the ID 26 is active.
In the specialday table is defined how many assignments and shifts are needed for this day.
Finally "AssignmentStruct" which contains the detailinfos to the assignement: whichb user is assigned to which shift:
AssignmentStruct - struct
318
AssignmentStruct - struct
assignment_shift 1
assignment_userfamilyname User
assignment_userfirstname Admin
assignment_userid 2
319
AssignmentStruct - struct
assignment_shift 1
assignment_userfamilyname Meier
assignment_userfirstname Herbert
assignment_userid 10
321
AssignmentStruct - struct
assignment_shift 2
assignment_userfamilyname User
assignment_userfirstname Admin
assignment_userid 2
322
AssignmentStruct - struct
assignment_shift 1
assignment_userfamilyname User
assignment_userfirstname Admin
assignment_userid 2
the text might not be that easy to understand.
An image with a screenshot including the cfdumps for the structs (on the 25th) is online at:
http://www.z-consulting.ch/calendar-example.gif
As you might see the 25th is a specialday which can have 3 shifts.
Assignments 318, 319, 321 are for this specialday whereby 318 and 319 are assigned to shift 1 ond 321 is in shift 2.
Now I loop to the assignments and only want to allow to add entries in each shift that has not yet reached the number of needed assignements (which is defined in #SpecialDaysStruct[SpecialDayStruct[DaysShown]]["specialday_neededassignements"]#)
The relevant code (with some commented out attempts is attached).
I just seem to turn in circles.
Any ideas on how to accomplish to restrict the "xfa.Enrol_for_Work" or "xfa.SelectPerson" respectively to only the cases where the "specialday_neededassignements" for the shift has not be reached?
Thanks for hints and help.
-------------------------------------------------------------------------------------------------------------------------
