{
    "header": {
        "version": 1,
        "type": "record"
    },
    "body": {
        "record1": {
            "<1>": "declare function fieldcount, msg, prod_spec_comm\r\n$insert msg_equates\r\n\r\n* VALIDATE THE DOPANTS\r\nVoid = set_property( @window, '@LayerOn', get_property( @window, '@CurSameLayer' ) + 1 )\r\nValid = prod_spec_comm( \"VALIDATE_DOPANT\" )\r\nif Valid else\r\n   return 0\r\nend\r\n\r\nCurSameLayerNo = get_property( @window, '@CurSameLayer' )\r\nif CurSameLayerNo = 1 then\r\n    MsgInfo = ''\r\n    MsgInfo<mtext$> = 'You are on the first same reactor layer...'\r\n    MsgInfo<micon$> = 'H'\r\n    Void = msg( '', MsgInfo )\r\nend else\r\n\tEpiPromptCnt = get_property( @window, '@EpiPromptCnt' )\r\n\tEpiControls = get_property( @window, '@EpiControls' )\r\n\tEpiDataOnWindow = get_property( EpiControls, 'LIST':@rm:'LIST':@rm:'INVALUE' )\r\n\tAllSameLayers  = get_property( @window, '@EpiInfo' )\r\n\tconvert @rm to @vm in EpiDataOnWindow\r\n\tif ( EpiDataOnWindow = @fm:@vm:@fm:str( @vm, EpiPromptCnt-2 ) ) and ( CurSameLayerNo < fieldcount( AllSameLayers, char(248) ) ) then\r\n\t    MsgInfo = ''\r\n\t    MsgInfo<mtext$> = 'You cannot have a blank same reactor layer...'\r\n\t    MsgInfo<micon$> = 'H'\r\n\t    Void = msg( '', MsgInfo )\r\n\t    return 0\r\n\tend else\r\n\t\tif EpiDataOnWindow = @fm:@vm:@fm:str( @vm, EpiPromptCnt-2 ) then\r\n\t\t    * null do not save\r\n\t\tend else\r\n    \t\t* there is epi info for this layer save to common\r\n\t\t    AllSameLayers = fieldstore( AllSameLayers, char(248), CurSameLayerNo, 1, EpiDataOnWindow )\r\n\t\t    Void = set_property( @window, '@EpiInfo', AllSameLayers )\r\n        end\t\t   \r\n\t\tCurSameLayerNo -= 1\r\n\t\tVoid = set_property( @window, '@CurSameLayer', CurSameLayerNo )\r\n\t\t* now display the previous same reactor layer\r\n\t\tPrevLayerData = field( AllSameLayers, char(248), CurSameLayerNo )\r\n\t\t*\r\n\t\tValueCnt = fieldcount( PrevLayerData, @vm )\r\n\t\t* so set_property does not propagate\r\n\t\tif ValueCnt < EpiPromptCnt then\r\n\t\t   PrevLayerData := str( @vm, EpiPromptCnt-ValueCnt-1 )\r\n\t\tend\r\n\t\t* ok\r\n\t\tconvert @vm to @rm in PrevLayerData\r\n\t\tVoid = set_property( EpiControls, 'LIST':@rm:'LIST':@rm:'INVALUE', PrevLayerData )\r\n\t\t.epi_conc_min_thick->selpos = 1:@fm:1\r\n\t\t.epi_conc_max_thick->selpos = 1:@fm:1\r\n\t\tNumLayers = fieldcount( AllSameLayers, char(248) )\r\n\t    ButText = .same_reactor_button->text\r\n\t    convert '123456789' to '' in ButText\r\n\t    ButText = trim( ButText )    \r\n\t    ButText := ' ':CurSameLayerNo\r\n\t    .same_reactor_button->text = ButText\r\n\t    .same_reactor_layer_desc->text = CurSameLayerNo:' of ':NumLayers\r\n\t    *    void = post_event( @window:'.EPI_MIN_THICK', 'GOTFOCUS', '' )\r\n        *    would need the above line if epi_min_thick had gotfocus event\r\n        void = set_property( @window:'.EPI_MIN_THICK', 'FOCUS', 1 )    \r\n\tend\r\nend\r\nreturn 0"
        }
    }
}