I want to control the shift calendar in the frame inside the main frame using 2 variables and a method on the main frame.
So I have 2 variables (CNC_rent_begin and CNC_rent_end) for the shift beginning time and for the shift end time. Inside the method I have a next text:
.Models.Wing_Shop.Cut_CNC.ShiftCalendarCut.ShiftPlan[2,1] := str_to_time(CNC_rent_begin);
.Models.Wing_Shop.Cut_CNC.ShiftCalendarCut.ShiftPlan[3,1] := str_to_time(CNC_rent_end);
For these variables I set the Plausibility in controls. Once I change the data in the variables, I don't get the change in the ShiftCalendar, which I want to control.
Are there any obvious mistakes?
Solved! Go to Solution.
save the shiftplan in a local table-variable first, change the value, apply the changed table to the shiftcalendar. Apparently you cannot directly access the shiftplan-table like you did. Had to try it out first, too
is myTab : table; do myTab := ShiftCalendar.ShiftPlan; myTab[2,1] := v_starttime; ShiftCalendar.ShiftPlan := myTab; end;