{
    "header": {
        "version": 1,
        "type": "record"
    },
    "body": {
        "record1": {
            "<1>": "declare function fieldcount, msg\r\n$insert msg_equates\r\n\r\nCurLayerNo = get_property( @window, '@CurLayer' )\r\nif CurLayerNo = 1 then\r\n    MsgInfo = ''\r\n    MsgInfo<mtext$> = 'You are on the first multi layer recipe...'\r\n    MsgInfo<micon$> = 'H'\r\n    Void = msg( '', MsgInfo )\r\nend else\r\n\tRecipePromptCnt = get_property( @window, '@RecipePromptCnt' )\r\n\tRecipeControls = get_property( @window, '@RecipeControls' )\r\n\tRecipeDataOnWindow = get_property( RecipeControls,'INVALUE' )\r\n\tAllLayers  = get_property( @window, '@RecipeInfo' )\r\n\tconvert @rm to @vm in RecipeDataOnWindow\r\n\tif ( RecipeDataOnWindow = str( @vm, RecipePromptCnt-1 ) ) and ( CurLayerNo < fieldcount( AllLayers, char(248) ) ) then\r\n\t    MsgInfo = ''\r\n\t    MsgInfo<mtext$> = 'You cannot have a blank multi layer recipe...'\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 RecipeDataOnWindow = str( @vm, RecipePromptCnt-1 ) then\r\n\t\t    * null do not save\r\n\t\tend else\r\n    \t\t* there is recipe info for this layer save to common\r\n\t\t    AllLayers = fieldstore( AllLayers, char(248), CurLayerNo, 1, RecipeDataOnWindow )\r\n\t\t    Void = set_property( @window, '@RecipeInfo', AllLayers )\r\n        end\t\t   \r\n\t\tCurLayerNo -= 1\r\n\t\tVoid = set_property( @window, '@CurLayer', CurLayerNo )\r\n\t\t* now display the previous recipe layer\r\n\t\tPrevLayerData = field( AllLayers, char(248), CurLayerNo )\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 < RecipePromptCnt then\r\n\t\t   PrevLayerData := str( @vm, RecipePromptCnt-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( RecipeControls, 'INVALUE', PrevLayerData )\r\n\t\tNumLayers = fieldcount( AllLayers, char(248) )\r\n\t    .layer_desc->text = CurLayerNo:' of ':NumLayers\r\n        void = set_property( @window:'.EPI_DOPANT', 'FOCUS', 1 )    \r\n\tend\r\nend\r\nreturn 0"
        }
    }
}