{
    "header": {
        "version": 1,
        "type": "record"
    },
    "body": {
        "record1": {
            "<1>": "\r\n/*******************************************************************************************\r\n** CURRENTLY DO NOTHING ON THE WO_MAINT_SCHED, MAYBE ADD LATER\r\ndeclare function start_window, msg, entid, repository, fieldcount, relational_call, memberof\r\ndeclare function rds_wo_verify_maint, rds_supplement_maint\r\ndeclare subroutine extract_si_keys\r\n$insert msg_equates\r\n$insert popup_equates\r\n$insert rds_equ\r\n\r\nSelpos = .sched_info->selpos\r\nColumn = SelPos<1>\r\nRow    = SelPos<2>\r\nColData = get_property( @window:'.SCHED_INFO', 'COLDATA' )\r\nCurCell = ColData<1,Row>\r\nCurCell = field( CurCell, '|', 1 ) ;* remove comments\r\nswap \"52nd\" with '' in CurCell\r\nConvert ';' to @vm in CurCell\r\nconvert @upper_case to '' in CurCell\r\nconvert @lower_case to '' in CurCell\r\nconvert \" `~!@#$%^&*()_+-=\\][{}|';:/?.>,<\" to '' in CurCell\r\nconvert '\"' to '' in CurCell\r\nPopupId = entid( @appid<1>, 'POPUP', '', 'MAST_SCHED_OPTS' )\r\nOverRide = ''\r\nDisplay = xlate( 'SYSREPOSPOPUPS', 'LSL2**MAST_SCHED_OPTS', pdisplay$, 'X' )\r\nif memberof( @user4, 'SUPERVISOR' ) then\r\n   * add option to choose boxes if the save button is enabled meaning they have the lock\r\n   *Display ='Recipe':@tm:'RECIPE':@vm:'RunData Sheet':@tm:'RDS':@vm:'Work Order':@tm:'WO'\r\n   * WHEN THE POPUP MAST_SCHED_OPTS CHANGES THE ABOVE 2 LINES NEED CHANGING\r\n   Display := @vm:'Assign WO Verifications':@tm:'WO_VERIFY'\r\nend\r\nif memberof( @user4, 'ENGINEERING' ) or memberof( @user4, 'SUPERVISOR' ) then\r\n   * ADD OPTION TO ASSIGN SUPPLEMENTS\r\n   Display := @vm:'Assign Supplements':@tm:'SUPPLEMENTS'\r\nend\r\nOverRide<Pdisplay$> = Display\r\nChoosenOpt = repository( 'EXECUTE', PopupId, @window, OverRide )\r\nbegin case\r\n    case ChoosenOpt = 'RECIPE'\r\n       CurKeys = ''\r\n       RecipeKeys = ''\r\n       WoCnt = fieldcount( CurCell, @vm )\r\n       for i = 1 to WoCnt\r\n          extract_si_keys( 'RDS', 'WO', CurCell<1,i>, CurKeys )\r\n          TrecKey = xlate( 'RDS', CurKeys<1,1>, rds_recipe_no$, 'X' ) ;* use first record for work order to get recipe no\r\n          if TrecKey then\r\n             locate TrecKey in RecipeKeys using @vm setting Dum else\r\n                RecipeKeys<1,-1> = TrecKey\r\n             end\r\n          end\r\n       next i\r\n       Void = start_window( 'RECIPE', @window, RecipeKeys:'*CENTER', '', '' )    \r\n\tcase ChoosenOpt = 'RDS'\r\n\t  *if fieldcount( CurCell, @vm ) > 1 then\r\n\t  *   * popup allowing view of only one work order at a time\r\n      *   PopupId = entid( @appid<1>, 'POPUP', '', 'MAST_SCHED_CHOOSE_WO' )\r\n      *   IF EVER UNREMARKING THIS CODE MUST CREATE MAST_SHCED_CHOOSE_WO POPUP\r\n      *   OverRide = ''\r\n      *   OverRide<pdisplay$> = CurCell\r\n      *   CurCell = repository( 'EXECUTE', PopupId, @window, OverRide )\r\n      *   if CurCell else\r\n      *      return 0\r\n      *   end\r\n\t  *end\r\n\r\n\t  Keys = relational_call( 'WO_LOG', 'RDS_KEYS', CurCell, 'RDS_QUERY', 'RDS', 'CUST_NAME':@fm:'WO':@fm:'RUN_ORDER_NUM' )\r\n\t  if Keys then\r\n\t     swap 'NoKeys' with '' in Keys\r\n\t\t ParamToPass = Keys\r\n\t     Void = start_window( 'RDS', @window, Keys:'*CENTER', '', '' )\r\n\t  end\r\n\tcase ChoosenOpt = 'WO'\r\n\t   RetVal = start_window( 'WO_LOG', @window, CurCell, '', '' ) \r\n\tcase ChoosenOpt = 'WO_VERIFY'\r\n\t   CCnt = fieldcount( CurCell, @vm )\r\n\t   for i = 1 to CCnt\r\n\t      TWo = CurCell<1,i>\r\n\t      if TWo <> '' then\r\n\t         Void = rds_wo_verify_maint(TWo)\t\r\n\t      end\r\n\t   next i\r\n\tcase ChoosenOpt = 'SUPPLEMENTS'\r\n\t   CCnt = fieldcount( CurCell, @vm )\r\n\t   for i = 1 to CCnt\r\n\t      TWo = CurCell<1,i>\r\n\t      if TWo <> '' then\r\n\t         Void = rds_supplement_maint(TWo)\t\r\n\t      end\r\n\t   next i\r\nend case\r\n********************************************************************/\r\nRETURN 0"
        }
    }
}