Hi work well only thing is that this creat me a error in the designer when i have a no value. Probably not a problem.
if currentValue and len(currentValue.value) > 8:
# note that this doesn't stop a user from selecting a ninth value, but it immediately removes the ninth value after selection.
self.props.value = previousValue.value
I used your firts option as the second one look to be over my current skillset.
Here is the querry i just learned how to do querry probably not the best.
IF EXISTS (SELECT * FROM Employe_Machine WHERE ShiftID = :ShiftID)
UPDATE Employe_Machine
SET ABS_1 = :ABS_1, ABS_2 = :ABS_2, ABS_3 = :ABS_3, ABS_4 = :ABS_4, ABS_5 = :ABS_5, ABS_6 = :ABS_6, ABS_7 = :ABS_7, ABS_8 = :ABS_8,
AS01_1 = :AS01_1, AS01_2 = :AS01_2, AS01_3 = :AS01_3, AS01_4 = :AS01_4, MP05_1 = :MP05_1, MP05_2 = :MP05_2, MP05_3 = :MP05_3, MP05_4 = :MP05_4,
MP09_1 = :MP09_1, MP09_2 = :MP09_2, MP09_3 = :MP09_3, MP09_4 = :MP09_4, MP10_1 = :MP10_1, MP10_2 = :MP10_2, MP10_3 = :MP10_3, MP10_4 = :MP10_4,
MP14_1 = :MP14_1, MP14_2 = :MP14_2, MP14_3 = :MP14_3, MP14_4 = :MP14_4, MP15_1 = :MP15_1, MP15_2 = :MP15_2, MP15_3 = :MP15_3, MP15_4 = :MP15_4,
MP16_1 = :MP16_1, MP16_2 = :MP16_2, MP16_3 = :MP16_3, MP16_4 = :MP16_4, MP17_1 = :MP17_1, MP17_2 = :MP17_2, MP17_3 = :MP17_3, MP17_4 = :MP17_4,
MP18_1 = :MP18_1, MP18_2 = :MP18_2, MP18_3 = :MP18_3, MP18_4 = :MP18_4, MP19_1 = :MP19_1, MP19_2 = :MP19_2, MP19_3 = :MP19_3, MP19_4 = :MP19_4,
MP20_1 = :MP20_1, MP20_2 = :MP20_2, MP20_3 = :MP20_3, MP20_4 = :MP20_4, MP21_1 = :MP21_1, MP21_2 = :MP21_2, MP21_3 = :MP21_3, MP21_4 = :MP21_4,
MP22_1 = :MP22_1, MP22_2 = :MP22_2, MP22_3 = :MP22_3, MP22_4 = :MP22_4, MP23_1 = :MP23_1, MP23_2 = :MP23_2, MP23_3 = :MP23_3, MP23_4 = :MP23_4,
MP24_1 = :MP24_1, MP24_2 = :MP24_2, MP24_3 = :MP24_3, MP24_4 = :MP24_4, Relais = :Relais
WHERE ShiftID = :ShiftID
ELSE
INSERT INTO Employe_Machine (ABS_1, ABS_2, ABS_3, ABS_4, ABS_5, ABS_6, ABS_7, ABS_8, AS01_1, AS01_2, AS01_3, AS01_4, MP05_1, MP05_2, MP05_3, MP05_4, MP09_1, MP09_2, MP09_3, MP09_4, MP10_1, MP10_2, MP10_3, MP10_4, MP14_1, MP14_2, MP14_3, MP14_4, MP15_1, MP15_2, MP15_3, MP15_4, MP16_1, MP16_2, MP16_3, MP16_4, MP17_1, MP17_2, MP17_3, MP17_4, MP18_1, MP18_2, MP18_3, MP18_4, MP19_1, MP19_2, MP19_3, MP19_4, MP20_1, MP20_2, MP20_3, MP20_4, MP21_1, MP21_2, MP21_3, MP21_4, MP22_1, MP22_2, MP22_3, MP22_4, MP23_1, MP23_2, MP23_3, MP23_4, MP24_1, MP24_2, MP24_3, MP24_4, ShiftID)
VALUES (:ABS_1, :ABS_2, :ABS_3, :ABS_4, :ABS_5, :ABS_6, :ABS_7, :ABS_8, :AS01_1, :AS01_2, :AS01_3, :AS01_4, :MP05_1, :MP05_2, :MP05_3, :MP05_4, :MP09_1, :MP09_2, :MP09_3, :MP09_4, :MP10_1, :MP10_2, :MP10_3, :MP10_4, :MP14_1, :MP14_2, :MP14_3, :MP14_4, :MP15_1, :MP15_2, :MP15_3, :MP15_4, :MP16_1, :MP16_2, :MP16_3, :MP16_4, :MP17_1, :MP17_2, :MP17_3, :MP17_4, :MP18_1, :MP18_2, :MP18_3, :MP18_4, :MP19_1, :MP19_2, :MP19_3, :MP19_4, :MP20_1, :MP20_2, :MP20_3, :MP20_4, :MP21_1, :MP21_2, :MP21_3, :MP21_4, :MP22_1, :MP22_2, :MP22_3, :MP22_4, :MP23_1, :MP23_2, :MP23_3, :MP23_4, :MP24_1, :MP24_2, :MP24_3, :MP24_4, :ShiftID)