added combobox dropdown options to the CALIB_LIST form

This commit is contained in:
Infineon\StieberD
2025-07-24 09:05:19 -07:00
parent 8f233705a2
commit 6396264e64
2 changed files with 591 additions and 611 deletions

File diff suppressed because it is too large Load Diff

View File

@ -67,25 +67,22 @@ END
RETURN Result RETURN Result
* * * * * * * * * * * * * *
Create: Create:
* * * * * * * * * * * * * *
IF MemberOf(@USER4,'CALIBRATION') ELSE
IF MemberOf(@USER4,'CALIBRATION') ELSE
ErrMsg('Only authorized personnel may update the Calibration List.') ErrMsg('Only authorized personnel may update the Calibration List.')
End_Window(@WINDOW) End_Window(@WINDOW)
RETURN RETURN
END END
obj_Appwindow('Create',@WINDOW)
obj_Appwindow('Create',@WINDOW) Set_List_Box_Data( @WINDOW )
// Use to determine whether or not the New Calibration label was just clicked
Set_List_Box_Data( @WINDOW ) Set_Property(@Window : '.CALIBRATIONS', '@PrintLabel', False$)
// Use to determine whether or not the New Calibration label was just clicked GOSUB Refresh
Set_Property(@Window : '.CALIBRATIONS', '@PrintLabel', False$)
GOSUB Refresh
RETURN RETURN
@ -95,41 +92,41 @@ Clear:
* * * * * * * * * * * * * *
IF Get_Property(@WINDOW,'@READONLY') THEN IF Get_Property(@WINDOW,'@READONLY') THEN
obj_AppWindow('ReadOnly',@RM:1) ;* Reenables data bound controls obj_AppWindow('ReadOnly',@RM:1) ;* Reenables data bound controls
Set_Property(@WINDOW,'@READONLY',0) ;* Clear flag on window Set_Property(@WINDOW,'@READONLY',0) ;* Clear flag on window
END END
* * * * * * * * * * * * * *
Refresh: Refresh:
* * * * * * * * * * * * * *
* QBF buttons * QBF buttons
Ctrls = @WINDOW:'.QBF_FIRST_FIX':@RM ; Props = 'ENABLED':@RM Ctrls = @WINDOW:'.QBF_FIRST_FIX':@RM ; Props = 'ENABLED':@RM
Ctrls := @WINDOW:'.QBF_PREV_FIX':@RM ; Props := 'ENABLED':@RM Ctrls := @WINDOW:'.QBF_PREV_FIX':@RM ; Props := 'ENABLED':@RM
Ctrls := @WINDOW:'.QBF_ABS_FIX':@RM ; Props := 'ENABLED':@RM Ctrls := @WINDOW:'.QBF_ABS_FIX':@RM ; Props := 'ENABLED':@RM
Ctrls := @WINDOW:'.QBF_NEXT_FIX':@RM ; Props := 'ENABLED':@RM Ctrls := @WINDOW:'.QBF_NEXT_FIX':@RM ; Props := 'ENABLED':@RM
Ctrls := @WINDOW:'.QBF_LAST_FIX':@RM ; Props := 'ENABLED':@RM Ctrls := @WINDOW:'.QBF_LAST_FIX':@RM ; Props := 'ENABLED':@RM
Ctrls := @WINDOW:'.QBF_STOP_FIX' ; Props := 'ENABLED' Ctrls := @WINDOW:'.QBF_STOP_FIX' ; Props := 'ENABLED'
IF Get_Property(@WINDOW,'QBFLIST') = '' THEN IF Get_Property(@WINDOW,'QBFLIST') = '' THEN
Vals = 0:@RM:0:@RM:0:@RM:0:@RM:0:@RM:0 Vals = 0:@RM:0:@RM:0:@RM:0:@RM:0:@RM:0
END ELSE END ELSE
Vals = 1:@RM:1:@RM:1:@RM:1:@RM:1:@RM:1 Vals = 1:@RM:1:@RM:1:@RM:1:@RM:1:@RM:1
END END
Set_Property(Ctrls,Props,Vals) Set_Property(Ctrls,Props,Vals)
* Turn edit table symbolic column backgrounds to green * Turn edit table symbolic column backgrounds to green
ETSymbolics = Get_Property(@WINDOW,'@ET_SYMBOLICS') ;* Loaded during 'Create' in obj_Appwindow ETSymbolics = Get_Property(@WINDOW,'@ET_SYMBOLICS') ;* Loaded during 'Create' in obj_Appwindow
ETCtrls = ETSymbolics<1> ETCtrls = ETSymbolics<1>
ETCols = ETSymbolics<2> ETCols = ETSymbolics<2>
FOR I = 1 TO COUNT(ETCtrls,@VM) + (ETCtrls NE '') FOR I = 1 TO COUNT(ETCtrls,@VM) + (ETCtrls NE '')
ETCtrl = ETCtrls<1,I> ETCtrl = ETCtrls<1,I>
ETList = Get_Property(ETCtrl,'LIST') ETList = Get_Property(ETCtrl,'LIST')
FOR Line = 1 TO COUNT(ETList,@FM) + (ETList NE '') FOR Line = 1 TO COUNT(ETList,@FM) + (ETList NE '')
@ -139,37 +136,32 @@ FOR I = 1 TO COUNT(ETCtrls,@VM) + (ETCtrls NE '')
NEXT N NEXT N
END END
NEXT Line NEXT Line
NEXT I NEXT I
RETURN RETURN
* * * * * * * * * * * * * *
Read: Read:
* * * * * * * * * * * * * *
CLNo = Get_Property(@WINDOW:'.CL_NO','DEFPROP') CLNo = Get_Property(@WINDOW:'.CL_NO','DEFPROP')
IF RowExists('CALIB_LIST',CLNo) ELSE IF RowExists('CALIB_LIST',CLNo) ELSE
IF Get_Property(@WINDOW:'.ENTER_DTM','DEFPROP') = '' THEN IF Get_Property(@WINDOW:'.ENTER_DTM','DEFPROP') = '' THEN
CurrDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTH') CurrDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTH')
Set_Property(@WINDOW:'.ENTER_DTM','DEFPROP',CurrDTM) Set_Property(@WINDOW:'.ENTER_DTM','DEFPROP',CurrDTM)
END END
END END
GOSUB Refresh GOSUB Refresh
// Use to determine whether or not the New Calibration button was just clicked and print if it was // Use to determine whether or not the New Calibration button was just clicked and print if it was
PrintCheck = Get_Property(@Window : '.CALIBRATIONS', '@PrintLabel') PrintCheck = Get_Property(@Window : '.CALIBRATIONS', '@PrintLabel')
If PrintCheck EQ True$ then If PrintCheck EQ True$ then
Gosub PrintMostRecentLabel Gosub PrintMostRecentLabel
end end
// Reset flag after read regardless // Reset flag after read regardless
Set_Property(@Window : '.CALIBRATIONS', '@PrintLabel', False$) Set_Property(@Window : '.CALIBRATIONS', '@PrintLabel', False$)
RETURN RETURN
@ -187,14 +179,6 @@ RETURN
Delete: Delete:
* * * * * * * * * * * * * *
/*
IF Security_Check('Order',Delete$) THEN
Result = 1 ;* Proceed with delete
END ELSE
Security_Err_Msg('Order',Delete$)
Result = 0 ;* Stop event chain
END
*/
RETURN RETURN
@ -203,13 +187,12 @@ RETURN
NewItem: NewItem:
* * * * * * * * * * * * * *
CLNo = Get_Property(@WINDOW:'.CL_NO','DEFPROP') CLNo = Get_Property(@WINDOW:'.CL_NO','DEFPROP')
IF CLNo = '' THEN IF CLNo = '' THEN
NextCLNo = NextKey('CALIB_LIST') NextCLNo = NextKey('CALIB_LIST')
obj_Appwindow('LoadFormKeys',@WINDOW:@RM:NextCLNo) obj_Appwindow('LoadFormKeys',@WINDOW:@RM:NextCLNo)
END END
RETURN RETURN
@ -218,37 +201,35 @@ RETURN
LUCalibItem: LUCalibItem:
* * * * * * * * * * * * * *
CLKeys = Popup(@WINDOW,'','CALIB_LIST') CLKeys = Popup(@WINDOW,'','CALIB_LIST')
IF Get_Status(errCode) THEN ErrMsg(ErrCode) IF Get_Status(errCode) THEN ErrMsg(ErrCode)
CONVERT @VM TO @FM IN CLKeys CONVERT @VM TO @FM IN CLKeys
IF INDEX(CLKeys,@FM,1) THEN IF INDEX(CLKeys,@FM,1) THEN
Send_Event(@WINDOW,'QBFINIT') Send_Event(@WINDOW,'QBFINIT')
Set_Property(@WINDOW,'QBFLIST',CLKeys) Set_Property(@WINDOW,'QBFLIST',CLKeys)
GOSUB Refresh GOSUB Refresh
Send_Event(@WINDOW,'QBFIRST') Send_Event(@WINDOW,'QBFIRST')
END ELSE END ELSE
obj_Appwindow('LoadFormKeys',@WINDOW:@RM:CLKeys) obj_Appwindow('LoadFormKeys',@WINDOW:@RM:CLKeys)
END END
RETURN RETURN
* * * * * * * * * * * * * *
LUCalibItemType: LUCalibItemType:
* * * * * * * * * * * * * *
CLItemType = Popup(@WINDOW,'','CALIB_LIST_TYPE') CLItemType = Popup(@WINDOW,'','CALIB_LIST_TYPE')
IF Get_Status(errCode) THEN ErrMsg(ErrCode) IF Get_Status(errCode) THEN ErrMsg(ErrCode)
IF CLItemType NE '' THEN IF CLItemType NE '' THEN
obj_AppWindow('LUValReturn',CLItemType:@RM:@WINDOW:'.CL_TYPE') obj_AppWindow('LUValReturn',CLItemType:@RM:@WINDOW:'.CL_TYPE')
END END
RETURN RETURN
@ -257,27 +238,24 @@ RETURN
LUCalibItemLoc: LUCalibItemLoc:
* * * * * * * * * * * * * *
CLItemLoc = Popup(@WINDOW,'','CALIB_LIST_LOC') CLItemLoc = Popup(@WINDOW,'','CALIB_LIST_LOC')
IF Get_Status(errCode) THEN ErrMsg(ErrCode) IF Get_Status(errCode) THEN ErrMsg(ErrCode)
IF CLItemLoc NE '' THEN IF CLItemLoc NE '' THEN
obj_AppWindow('LUValReturn',CLItemLoc:@RM:@WINDOW:'.CAL_LOC') obj_AppWindow('LUValReturn',CLItemLoc:@RM:@WINDOW:'.CAL_LOC')
END END
RETURN RETURN
* * * * * * * * * * * *
Close: Close:
* * * * * * * * * * * *
obj_Notes('Inbox',@USER4) ;* Checks for any new messages
obj_Notes('Inbox',@USER4) ;* Checks for any new messages Send_Event('MASTER_CALIB_LIST','CREATE')
Send_Event('MASTER_CALIB_LIST','CREATE')
RETURN RETURN
@ -287,18 +265,18 @@ RETURN
CalibrationsDC: CalibrationsDC:
* * * * * * * * * * * * * *
CtrlEntID = @WINDOW:'.CALIBRATIONS' CtrlEntID = @WINDOW:'.CALIBRATIONS'
CurrPos = Get_Property(CtrlEntID,'SELPOS') CurrPos = Get_Property(CtrlEntID,'SELPOS')
CurrCol = CurrPos<1> CurrCol = CurrPos<1>
CurrRow = CurrPos<2> CurrRow = CurrPos<2>
CalDt = Get_Property(CtrlEntID,'CELLPOS',COL$CAL_DT:@FM:CurrRow) CalDt = Get_Property(CtrlEntID,'CELLPOS',COL$CAL_DT:@FM:CurrRow)
CalDt = ICONV(CalDt,'D') CalDt = ICONV(CalDt,'D')
CLNo = Get_Property(@WINDOW:'.CL_NO','DEFPROP') CLNo = Get_Property(@WINDOW:'.CL_NO','DEFPROP')
IF CLNo NE '' AND CalDt NE '' THEN IF CLNo NE '' AND CalDt NE '' THEN
IF Get_Property(@WINDOW,'QBFLIST') = '' THEN IF Get_Property(@WINDOW,'QBFLIST') = '' THEN
Send_Event(@WINDOW,'WRITE') Send_Event(@WINDOW,'WRITE')
@ -314,8 +292,7 @@ IF CLNo NE '' AND CalDt NE '' THEN
obj_Appwindow('ViewNewDetail', oaParms) obj_Appwindow('ViewNewDetail', oaParms)
END
END
RETURN RETURN
@ -324,11 +301,11 @@ RETURN
NewCalibClick: NewCalibClick:
* * * * * * * * * * * * * *
CtrlEntID = @WINDOW:'.CALIBRATIONS' CtrlEntID = @WINDOW:'.CALIBRATIONS'
CLNo = Get_Property(@WINDOW:'.CL_NO','DEFPROP') CLNo = Get_Property(@WINDOW:'.CL_NO','DEFPROP')
IF CLNo NE '' THEN IF CLNo NE '' THEN
IF Get_Property(@WINDOW,'QBFLIST') = '' THEN IF Get_Property(@WINDOW,'QBFLIST') = '' THEN
Send_Event(@WINDOW,'WRITE') Send_Event(@WINDOW,'WRITE')
@ -346,17 +323,18 @@ IF CLNo NE '' THEN
// New Calibration label was just clicked, set to true // New Calibration label was just clicked, set to true
Set_Property(@Window : '.CALIBRATIONS', '@PrintLabel', True$) Set_Property(@Window : '.CALIBRATIONS', '@PrintLabel', True$)
END END
RETURN RETURN
********************* *********************
PrintMostRecentLabel: PrintMostRecentLabel:
********************* *********************
CLNo = Get_Property(@WINDOW:'.CL_NO','DEFPROP') CLNo = Get_Property(@WINDOW:'.CL_NO','DEFPROP')
IF CLNo NE '' THEN IF CLNo NE '' THEN
TableList = Get_Property(@WINDOW:'.CALIBRATIONS', 'LIST') TableList = Get_Property(@WINDOW:'.CALIBRATIONS', 'LIST')
EquipmentID = Get_Property(@WINDOW:'.EQ_DESC', 'TEXT') EquipmentID = Get_Property(@WINDOW:'.EQ_DESC', 'TEXT')
LastCalibration = Get_Property(@WINDOW:'.LAST_CAL_DT', 'TEXT') LastCalibration = Get_Property(@WINDOW:'.LAST_CAL_DT', 'TEXT')
@ -365,10 +343,7 @@ IF CLNo NE '' THEN
NextCalibration = Get_Property(@WINDOW:'.NEXT_CAL_DT', 'TEXT') NextCalibration = Get_Property(@WINDOW:'.NEXT_CAL_DT', 'TEXT')
CalibratedBy = TableList<1,2> CalibratedBy = TableList<1,2>
Labeling_Services('PrintCalibrationLabel', EquipmentID, LastCalibration, NextCalibration, CalibratedBy, FrequencyVal, FrequencyUnit, '') Labeling_Services('PrintCalibrationLabel', EquipmentID, LastCalibration, NextCalibration, CalibratedBy, FrequencyVal, FrequencyUnit, '')
end end
return return