RecipeSelectPreviousRecipe() function
- Last UpdatedJun 17, 2024
- 1 minute read
The RecipeSelectPreviousRecipe() function selects the previous recipe defined in the recipe template file.
Category
Recipe
Syntax
RecipeSelectPreviousRecipe("Filename","RecipeName",Number);
Arguments
FileName
Name of the recipe template file. The FileName argument can be a string constant or a message tag containing the name of the recipe template file.
RecipeName
Message tag that contains the recipe name to use as a starting point (before the function is executed) and the selected recipe name (after the function is executed). Actual message tag without quotation marks or a string literal.
Number
Maximum string length returned to the parameter. In InTouch, Message tags have a maximum length of 131 characters. Use 131 for this parameter unless you have reduced the maximum string length of the InTouch tag. Number or Integer tag.
Example
The following statement causes the system to read the current value of the tag RecipeName and return the previous Recipe Name on file. This returned string will be stored in RecipeName and will overwrite the current value. If the value of RecipeName is blank or cannot be found, the last recipe on file is returned. If RecipeName currently contains the first Recipe Name on file, it is returned unchanged. Recipes are saved in the order in which they are created.
RecipeSelectPreviousRecipe("c:\recipe\recfile.csv", RecipeName, 131);