Resources with IDs
Posted: Thu May 14, 2015 12:12 pm
I've just started setting up DayBack for use with Tasks (those are my events) that each have a Crew assigned. The Crews are created elsewhere (a foreman and some laborers), and it is the CrewID that is assigned to each Task. Basically, users should only be able to change the date and crew in Calendar mode. I'm using a custom layout instead of the Event popover and that helps with that level of control. Dates are changed by dragging in the WV or in the custom layout fine. Crews are changed in the custom layout (popup value list hiding IDs) fine. But dragging an event from one Resource to another Resource in the Resource WV is not working.
Here's the setup:
Source no1 is set to the TASK table. Resource is mapped to ID_Crew (foreign key in TASK for its crew)
Related source no1 is set to the CREW table. id is mapped to the CrewID and name is mapped to the CrewName.
Load Resources script has been modified to set $$sc_ResourceList using a List calc and the Crew Names show up fine as Resource column headers.
Create Edit Delete Event script has been modified to use ExecuteSQL to get the CrewID and set the TASK::ID_Crew field.
When I drag a Task from one Resource to another, I can watch everything in the debugger and monitor the utility window (which is displaying temporarily within normal view). I can see the variables are OK and the foreign key is getting set as I would expect it. But, towards the very end, right after exporting the CalendarInterface::ExportGlob (in Export Data To Temp Directory script), I see my Task flop back to its original Resource.
How can I make sure dragging in the Resource view works? TIA,
debi
Here's the setup:
Source no1 is set to the TASK table. Resource is mapped to ID_Crew (foreign key in TASK for its crew)
Related source no1 is set to the CREW table. id is mapped to the CrewID and name is mapped to the CrewName.
Load Resources script has been modified to set $$sc_ResourceList using a List calc and the Crew Names show up fine as Resource column headers.
Create Edit Delete Event script has been modified to use ExecuteSQL to get the CrewID and set the TASK::ID_Crew field.
When I drag a Task from one Resource to another, I can watch everything in the debugger and monitor the utility window (which is displaying temporarily within normal view). I can see the variables are OK and the foreign key is getting set as I would expect it. But, towards the very end, right after exporting the CalendarInterface::ExportGlob (in Export Data To Temp Directory script), I see my Task flop back to its original Resource.
How can I make sure dragging in the Resource view works? TIA,
debi