Recipe worksheet

A Recipe worksheet is used to load tag values from or save tag values to an external file during runtime. It is typically used to execute process recipes, but you can store any type of information (such as operation logs, passwords, and so on) in the external file.

To create a new Recipe worksheet, do one of the following:
  • On the Insert tab of the ribbon, in the Task Worksheets group, click Recipe;
  • Right-click the Recipes folder in the Project Explorer, and then click Insert on the shortcut menu; or
  • Click New on the Application menu, click the File tab, and then select Recipe Worksheet.

To edit an existing Recipe worksheet, double-click it in the Project Explorer.

Figure 1. Recipe worksheet
Web Studio Help worksheet tasks recipe Recipes

The worksheet is divided into two areas:
  • Header area (top section), which contains information for the whole group
  • Body area (bottom section), where you define each tag in the group.
Use the Header parameters on this worksheet as follows:
  • Description field: Type a description of the worksheet, for documentation purposes.
  • File Name field: Type the name of the external file, using static text ( File1 ) or a indirect tag ( {FileNameTag} ).
  • Register Number field: Type a tag to define the register number to be read or written into a DBF file. (This field is for legacy purposes only and is no longer used.)
  • Save As XML: Select (check) to save information in XML format, or deselect (uncheck) to save in DAT format.

    You can load information in a .DAT file into different tags using a second Recipe worksheet, but you must load information in an .XML file into tags with the same name as the tag from which the data originated.

    Note: As with HTML pages, you must be running the Web server to view XML data from the Web. Unlike the HTML pages in the runtime system, XML pages do not need to have the project running to view the XML data. (You must be running Internet Explorer version 5.0 or higher to view XML data.)
  • Unicode checkbox: Click (enable) to save the recipe in Unicode format (two bytes per character) or (disable) to save the recipe in ANSI format (one byte per character).
Note: When saving a worksheet, you can save it using any name you choose (you are not required to use a predefined file name). A configuration file using the default extension .RCP (or .XSL if you specify Save As XML) contains the recipe configuration and the File Name field contains the data file name to be read or written.
Use the Body parameters on this worksheet as follows:
  • Tag Name field: Type tag names to update with file contents or with values to write to a file. If the tag is an array, you must specify the first position to use.

    If the tag is an Array or a Class (or both), then the development application automatically enables every array position and class member by default. To configure a specific array position and/or class member, type it in the Tag Name field as normal. For example, level[3].member.

  • Number of Elements field: Specify how many positions of the array tag are in use.
    Tip: You can configure a tag name between curly brackets ({tagname}) in this field, allowing the user to dynamically change the Number of Elements configured in the Recipe for each array tag, during runtime.

To execute a Recipe worksheet, use the Recipe function anywhere an expression is allowed.

Recipes