Cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the Shift Calendar using a variable

Experimenter
Experimenter

Hi!

 

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:

--

is

do

.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);

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?

2 REPLIES

Betreff: How to change the Shift Calendar using a variable

Gears Phenom Gears Phenom
Gears Phenom

Hi Eldar,

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 Smiley Happy

is
	myTab : table;
do
	myTab 			:= ShiftCalendar.ShiftPlan;
	myTab[2,1] 		:= v_starttime;
	ShiftCalendar.ShiftPlan	:= myTab;
end;

Regards,
Alex

____________________________________________________________
Alex Dilg, Consultant at SimPlan AG (www.SimPlan.de)
This post was good and/or helpful to you? Please provide some Kudos, thank you!

Betreff: How to change the Shift Calendar using a variable

Experimenter
Experimenter

Thanks a lot, Alex! That works! Smiley Happy