User Tools

Site Tools


recipes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
recipes [2020/06/01 13:39] emozolyakrecipes [2022/01/15 15:41] (current) – ↷ Links adapted because of a move operation 127.0.0.1
Line 1: Line 1:
 +{{ network:menu-icon-recipes.png?nolink&40|}}
 ======Recipes====== ======Recipes======
  
Line 7: Line 8:
   * Recipe list can be used as a handy tool for analysing user choice from different options. In this case recipe names in the list or category serve as a placeholders for the selection listbox. The selected id is returned to the lua script which then can process the selection.    * Recipe list can be used as a handy tool for analysing user choice from different options. In this case recipe names in the list or category serve as a placeholders for the selection listbox. The selected id is returned to the lua script which then can process the selection. 
  
-===== Recipe setup page =====+===== Recipes page=====
  
 The recipe management menu resides in a 'logic' section of the Setup menu: The recipe management menu resides in a 'logic' section of the Setup menu:
  
-{{ ::recipes_entry.png?direct&600 |}} +{{ network:recipes_entry.png?direct&600 |}} 
  
 The main spots of the recipe management page are: The main spots of the recipe management page are:
Line 22: Line 23:
   - Edit/Delete/Clone buttons   - Edit/Delete/Clone buttons
  
-{{ ::recipe_list_inum.png?direct&600 |}}+{{ network:recipe_list_inum.png?direct&600 |}}
  
 ===== Recipe setup===== ===== Recipe setup=====
Line 35: Line 36:
   ***Add register to recipe** button expands the list with a new entry    ***Add register to recipe** button expands the list with a new entry 
  
 +{{ network:recipe_basic_tab.png?direct&600 |}}
  
 +The //Permission// tab lists the users who can view or edit recipes. 
 +{{ network:recipe_permissions.png?direct&600 |}}
  
-Recipes can have sub-categories, i.e. the list of recipes on dashboard can be displayed completely, or only from a certain category.+===== Using recipe on the dashboard =====
  
-{{ :recipes2.png?direct |category}}+When placing a recipes selection listbox on a dashboard, there are some specific attributes you must specify:
  
-And also be available to specific users.+  * //Category// of recipes, or a full list.  
 +  * The //register// accosiated with the dropdown list which will keep the //id// of the selected recipe.  
 +  * '//Allow change value//' checkbox. If you want the user be able to expand the list, check it, otherwise the user won't be able to select and expand the list. With unchecked option, the recipes can be itereated with the lua script and extra buttons which return next/previous selection event (register value coding the action)  
 +  * '//Apply immediately//' checkbox. The values from the set will be written at once after selection, or you can check register change in a lua script and first do some steps before applying a recipe
  
-{{ :recipes3.png?direct |users}} 
  
-When placing a list of recipes on a dashboard, you must specify:+{{ network:recipe_on_the_dashboard.png?direct&600 |}}
  
-  * Category of recipes, or a complete list of all categories +If the user has right to edit the recipe, he can do this right in the selectoin box:
-  * Drop-down or multiline list +
-  * Number of the register where the recipe number will change. (changing this register can be monitored in scripts when you need to perform some actions associated with this recipe) +
-  * Whether to apply the recipe immediately or not (in the second case, only the register number will change where the current recipe number is stored)+
  
-{{ :recipe4.png?direct |dashboard}}+{{ network:quick_rcp_apply_edit.gif |}}
  
-To apply recipes within scripts, the **ApplyRecipe (recipeId, userId)** function is used. [[working_with_recipes|See here]]. After it is executed, if a list is displayed on one of the dashboards, the contents of the recipe from the ApplyRecipe function, you must also write the recipe number in the register tied to the list - to synchronize the display of the list.+===== Using recipes in scripts ===== 
 + 
 +To apply recipes within scripts, the **ApplyRecipe (recipeId, userId)** function is used. [[working_with_recipes|See here]]. The example of such script: 
 + 
 +<code lua> 
 +function main (userId) 
 +    local id = GetReg("rcpSelector"
 +    ApplyRecipe(iduserId) 
 +    AddInfoMessage("The recipe with id = " .. id .. " was applied!"
 +end 
 +</code> 
 + 
 +{{ network:recipe_in_scripts.gif |}}
recipes.1591018764.txt.gz · Last modified: 2020/06/01 13:39 by emozolyak

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki