{
    "header": {
        "version": 1,
        "type": "record"
    },
    "body": {
        "record1": {
            "<1>": "declare subroutine forward_event, security_err_msg, Comm_RDS\r\ndeclare function company_comm, msg, security_check, post_event, rowexists\r\ndeclare function fieldcount, scroll_enable, rds_comm, rds_comm2\r\n$insert logical\r\n$insert security_rights_equ\r\n$insert rds_equ\r\n$insert msg_equates\r\n$insert prod_spec_equates\r\n$insert quote_spec_equ\r\n\r\nNewRecord = false$\r\nRDSNo = .rds_no->text\r\nswap '1T' with '' in RDSNo\r\n.rds_no->text = RDSNo\r\n\r\nif rowexists( 'RDS', RDSNo ) then\r\n   ReadOk = true$\r\nend else\r\n   * user is trying to add new don't allow ( only create via schedule )\r\n   MsgInfo = ''\r\n   MsgInfo<mtext$> = 'Post Epi - You can only create run data sheets from schedule.'\r\n   MsgInfo<micon$> = 'H'\r\n   Void = msg( '', MsgInfo )\t  \r\n   ReadOk = false$\r\n   .rds_no->text = ''\r\n   Void = post_event( CtrlEntId, 'CLEAR', False$, True$ )\r\nend\r\nif ReadOk then\r\n   if get_property( @window, '@NoRead' ) then\r\n       Void = set_property( @window, '@NoRead', 0 )\r\n   end else\r\n       * no qbf active do the read\r\n       * if it is active the read already took place\r\n       forward_event()\r\n   end\r\n   if .post_clean->text = 'No' then\r\n      * NO POST CLEAN REQUIRED SO PROTECT THE PROPER FIELDS\r\n      .postcleansrd->enabled    = 0\r\n      .postcleancassid->enabled = 0\r\n      .postcleancode->enabled   = 0\r\n   end else\r\n      .postcleansrd->enabled    = 1\r\n      .postcleancassid->enabled = 1\r\n      .postcleancode->enabled   = 1\r\n   end   \r\n   \r\n\t* Added by JCH on 4/17/2004 - Update for SURF_SCAN table addition * * * * * * * * * * *\r\n\t\r\n\tIF Get_Property(@WINDOW:'.SURFSCAN','CHECK') THEN\r\n\t\tstat = Set_Property(@WINDOW:'.SURF_SCAN_BUTTON','ENABLED',1)\r\n\tEND ELSE\r\n\t\tstat = Set_Property(@WINDOW:'.SURF_SCAN_BUTTON','ENABLED',0)\r\n\tEND\r\n\t\r\n\tComm_RDS('Refresh')\r\n     \r\n   * End of mod by JCH   \r\n   \r\n   .thick_all_label->text = xlate( 'RDS', RdsNo, 'THICK_MIN_TAR_MAX', 'X' )\r\n   .res_all_label->text   = xlate( 'RDS', RdsNo, 'RES_MIN_TAR_MAX', 'X' )\r\n   .con_all_label->text   = xlate( 'RDS', RdsNo, 'CON_MIN_TAR_MAX', 'X' )   \r\n   TMod = .mod_info->array\r\n   InMod = Tmod<1>\r\n   TMod<2> = oconv( InMod, '[XLATE_CONV,LSL_USERS*FIRST_LAST]' )\r\n   .mod_info->array = TMod\r\n   DisFields = 'REACTOR/LOT_NUM/QUOTE_NO/CUST_INFO/STATUS/PO_WO_PARTNUM/LOT_NUM_VERIFY/'   \r\n   DisFields:= 'RUN_ORDER_NUM/WAFERS_SCHEDULED/POST_EPI_SIG/POST_EPI_SIG_NAME/'\r\n   DisFields:= 'POST_EPI_SIG_DATE/POST_EPI_SIG_TIME/POST_EPI_SUP_SIG/POST_EPI_SUP_SIG_NAME/'\r\n   DisFields:= 'POST_EPI_SUP_SIG_DATE/POST_EPI_SUP_SIG_TIME/POST_CLEAN/POST_EPI_BUTTON/SHIP_BAG_REQ/'\r\n   DisFields:= 'BRIGHTLIGHT/SURFSCAN/SURFSCAN_RECIPE/WAFERS_OUT'\r\n   swap '/' with @rm:@window:'.' in DisFields\r\n   DisFields = @window:'.':DisFields\r\n   void = set_property( DisFields, 'ENABLED', 0 )\r\n   if NewRecord else\r\n\t   if security_check( 'RDS', Edit$ ) else\r\n\t      * protect all fields\r\n\t      AllControls = utility( 'OBJECTLIST', @window, '' )\r\n\t      Acnt = fieldcount( AllControls, @fm )     \r\n\t      for i = 1 to Acnt         \r\n\t         ThisControl = AllControls<i>\r\n\t         if ThisControl[-6,6] = '_LABEL' or index( ThisControl, 'MENU', 1 ) or index( ThisControl, 'TEXT', 1 ) else\r\n\t            void = set_property( ThisControl, 'ENABLED', 0 )\r\n\t         end           \r\n\t      next i   \r\n          Void = scroll_enable()\t         \t      \r\n\t   end\r\n   end\r\n   \r\n   Void = rds_comm( \"READ_STORE\" )\r\n   Void = rds_comm2('HOLD_CHECK')\r\n   Void = rds_comm2( \"SUPPL_CHECK\" )         \r\nend\r\n* SET A VARIABLE TO THE SUPERVISOR SIGNATURE SO WHEN THEY SAVE\r\n* IF THERE WASN'T A SIGNATURE AND THERE IS ON THE WRITE TO \r\n* AUTOMATICALLY PRINT A SHIPPING LABEL\r\nVoid = set_property( @window, '@PostEpiSupSig', .post_epi_sup_sig->text )\r\nreturn 0  \r\n"
        }
    }
}