{"id":65599,"date":"2026-11-25T19:16:10","date_gmt":"2026-11-25T18:16:10","guid":{"rendered":"https:\/\/amit-automation.cz\/podpora\/casto-kladene-otazky\/amit-designer-napoveda\/%e2%9c%b5-recipes-advanced\/"},"modified":"2026-11-25T19:16:10","modified_gmt":"2026-11-25T18:16:10","slug":"%e2%9c%b5-recipes-advanced","status":"publish","type":"napoveda","link":"https:\/\/amit-automation.cz\/en\/support\/faq\/amit-designer-help\/%e2%9c%b5-recipes-advanced\/","title":{"rendered":"\u2735 Recipes Advanced"},"content":{"rendered":"<p>Advanced recipes give you the option to combine recipes together with scripting and components such as smart input component, in that way you can do step-by-step filtering to make it more user friendly.<\/p>\n<p><strong>Using recipes together with smart input field:<\/strong><\/p>\n<p>First, we need to create a recipe as shown in the recipe section.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/myscada.org\/downloads\/manuals_image\/myDESIGNER_NEW\/Screenshot_189.jpg\" alt=\"\" width=\"1917\" height=\"1036\" \/><\/p>\n<p>Then we fill recipe with some data.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/myscada.org\/downloads\/manuals_image\/myDESIGNER_NEW\/Screenshot_190.jpg\" alt=\"\" width=\"1917\" height=\"1038\" \/><\/p>\n<p>Now we will create a view and set active recipe on this view<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/myscada.org\/downloads\/manuals_image\/myDESIGNER_NEW\/Screenshot_191.jpg\" alt=\"\" width=\"1917\" height=\"1037\" \/><\/p>\n<p>We want to filter by name.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/myscada.org\/downloads\/manuals_image\/myDESIGNER_NEW\/Screenshot_192.jpg\" alt=\"\" width=\"1918\" height=\"1040\" \/><\/p>\n<p>We add smart-input component into our view<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/myscada.org\/downloads\/manuals_image\/myDESIGNER_NEW\/Screenshot_193.jpg\" alt=\"\" width=\"1918\" height=\"1036\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/myscada.org\/downloads\/manuals_image\/myDESIGNER_NEW\/Screenshot_194.jpg\" alt=\"\" width=\"1074\" height=\"845\" \/><\/p>\n<p>As a type we can either select c<strong>ombo-box string<\/strong> or <strong>list-box string<\/strong><\/p>\n<p>Now as a tag we will click on <strong>&#8220;&#8230;&#8221;\u00a0<\/strong>go into equations and then click on &#8220;variables&#8221;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/myscada.org\/downloads\/manuals_image\/myDESIGNER_NEW\/Screenshot_195.jpg\" alt=\"\" width=\"1073\" height=\"848\" \/><\/p>\n<p>We will select <strong>activeRecipeFilter1\u00a0<\/strong>(<strong>1<\/strong> because the name is the first item which we have checked in active recipe selection on the view), press okay.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/myscada.org\/downloads\/manuals_image\/myDESIGNER_NEW\/Screenshot_196.jpg\" alt=\"\" width=\"1076\" height=\"849\" \/><\/p>\n<p>Now we need to set &#8220;dynamic items&#8221; scroll down a bit, now because we want to filter out the name we put a variable <strong>activeRecipeFilteredData[&#8216;name&#8217;]\u00a0<\/strong>inside.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/myscada.org\/downloads\/manuals_image\/myDESIGNER_NEW\/Screenshot_197.jpg\" alt=\"http:\/\/myscada.org\/downloads\/manuals_image\/myDESIGNER_NEW\/Screenshot_197.jpg\" width=\"1239\" height=\"930\" \/><\/p>\n<p>Now we can insert component.<\/p>\n<p>To make it more automatic without need of user action we can also create a function in view script which will open up the active area with the filter which user select.<\/p>\n<p>So we will create a active area inside view without any init and then head to view script.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/myscada.org\/downloads\/manuals_image\/myDESIGNER_NEW\/Screenshot_198.jpg\" alt=\"http:\/\/myscada.org\/downloads\/manuals_image\/myDESIGNER_NEW\/Screenshot_189.jpg\" width=\"1062\" height=\"842\" \/><\/p>\n<p>We will create a function<\/p>\n<p><strong>function openRecipeFilter(){<\/strong><\/p>\n<p><strong>var options1={};<\/strong><br \/>\n<strong>options1[&#8216;type&#8217;]=&#8221;recipe&#8221;;<\/strong><br \/>\n<strong>options1[&#8216;screen&#8217;]=&#8221;activeRecipeShow&#8221;;<\/strong><br \/>\n<strong>options1[&#8216;target&#8217;]=1;<\/strong><br \/>\n<strong>options1[&#8216;textScale&#8217;]=100;<\/strong><br \/>\n<strong>options1[&#8216;rowFilter&#8217;]=true;<\/strong><br \/>\n<strong>options1[&#8216;disableFilterRow&#8217;]=false;<\/strong><br \/>\n<strong>myscada.openCommand(options1);<\/strong><\/p>\n<p><strong>}<\/strong><\/p>\n<p>Which will open up &#8220;Active recipe&#8221; in Active area when called.<\/p>\n<p>Now head back to the view, on the smart-input component there is a option to use &#8220;callback function&#8221; which will call a function from view script when the selection of filter is done.<br \/>\nSo when the user select his recipe filter it will open up active area with selected filter and recipes which fits the filtered text or value.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/myscada.org\/downloads\/manuals_image\/myDESIGNER_NEW\/Screenshot_199.jpg\" alt=\"http:\/\/myscada.org\/downloads\/manuals_image\/myDESIGNER_NEW\/Screenshot_189.jpg\" width=\"1530\" height=\"954\" \/><\/p>\n<p>Now if we download a project it will look like this:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/myscada.org\/downloads\/manuals_image\/myDESIGNER_NEW\/Screenshot_200.jpg\" alt=\"\" width=\"1916\" height=\"1001\" \/><\/p>\n<p>As you can see inside listbox we display all the available recipe names now if we select one of them it will open up active area with filtered recipe.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/myscada.org\/downloads\/manuals_image\/myDESIGNER_NEW\/Screenshot_201.jpg\" alt=\"\" width=\"1915\" height=\"998\" \/><\/p>\n<p>Now as you can see once we have selected item we can&#8217;t just go back and select the other recipe (Like if we miss-clicked or something).<br \/>\nThere is a feature on smart input which solves this.<br \/>\nSimply just check &#8220;Add not selected item&#8221;.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/myscada.org\/downloads\/manuals_image\/myDESIGNER_NEW\/Screenshot_202.jpg\" alt=\"\" width=\"1525\" height=\"952\" \/><\/p>\n<p>And download the project once again.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/myscada.org\/downloads\/manuals_image\/myDESIGNER_NEW\/Screenshot_203.jpg\" alt=\"\" width=\"1918\" height=\"963\" \/><\/p>\n<p>Now we can select again but as you can see we have a <strong>&#8220;&#8212;&#8221;\u00a0<\/strong>which gives us option to reset filter.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/myscada.org\/downloads\/manuals_image\/myDESIGNER_NEW\/Screenshot_205.jpg\" alt=\"\" width=\"1915\" height=\"998\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/myscada.org\/downloads\/manuals_image\/myDESIGNER_NEW\/Screenshot_206.jpg\" alt=\"\" width=\"1912\" height=\"997\" \/><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"menu_order":147,"template":"","class_list":["post-65599","napoveda","type-napoveda","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/amit-automation.cz\/en\/wp-json\/wp\/v2\/napoveda\/65599","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/amit-automation.cz\/en\/wp-json\/wp\/v2\/napoveda"}],"about":[{"href":"https:\/\/amit-automation.cz\/en\/wp-json\/wp\/v2\/types\/napoveda"}],"version-history":[{"count":0,"href":"https:\/\/amit-automation.cz\/en\/wp-json\/wp\/v2\/napoveda\/65599\/revisions"}],"wp:attachment":[{"href":"https:\/\/amit-automation.cz\/en\/wp-json\/wp\/v2\/media?parent=65599"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}