Table of Contents

Recipes

The recipe allows you to initialize a set of registers with pre-defined values. There are several options for using recipes:

Recipes page

The recipe management menu resides in a 'logic' section of the Setup menu:

The main spots of the recipe management page are:

  1. Import/Export buttons. The recipe can be exported to a JSON file. After importing such recipe file, it will create a new entry in the list with a new id.
  2. Add recipe button
  3. Recipe category. use them to divide the list, then the dropdown lists on dashboard can show only specific category you set for them
  4. 'Locked' recipe colored light gray. This recipe can only be edited by admin, but still viewed by the users with respective rights
  5. Checkbox for selecting export candidates
  6. Common (non-locked) recipe list.
  7. Edit/Delete/Clone buttons

Recipe setup

The Basic tab:

The Permission tab lists the users who can view or edit recipes.

Using recipe on the dashboard

When placing a recipes selection listbox on a dashboard, there are some specific attributes you must specify:

If the user has right to edit the recipe, he can do this right in the selectoin box:

Using recipes in scripts

To apply recipes within scripts, the ApplyRecipe (recipeId, userId) function is used. See here. The example of such script:

function main (userId)
    local id = GetReg("rcpSelector")
    ApplyRecipe(id, userId)
    AddInfoMessage("The recipe with id = " .. id .. " was applied!")
end