--- title: "Advanced Component" slug: "advanced-component" updated: 2023-02-13T09:57:05Z published: 2023-02-13T09:57:05Z canonical: "help.pillir.io/advanced-component" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.pillir.io/llms.txt > Use this file to discover all available pages before exploring further. # Advanced Component The Advanced component consists of blocks that perform specific actions. ## Try Catch Finally - The Try statement lets you test a block of statements for errors. - The Catch statement lets you handle the error. The catch statement has an inbuilt error variable that can be used for diagnosing. - The Finally statement lets you execute code, after trying and catching, regardless of the result. | Block Layout | Generated Output | | --- | --- | | ![TryCatch](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/TryCatch.png) | ```javascript function er_82dd5cda_4b05_447c_a856_6d43bb829825_onPageShow(e,obj,index){ try{ } catch(err){ } finally { } } ``` | ## Regular Expression Regular Expressions are patterns useful for efficient text processing. A regular expression can be matched, tested, or executed by specifying the expression path and input values. | Input | Output | Block Layout | Generated Code | | --- | --- | --- | --- | | Choose the type of Text matching from the dropdown list(match, test, exec) Regex format as a variable or Text - input-1, Input data as a variable or Text - input-2 | For **match**: returns matching text else null, For **test**: returns true or false, based on the result, For **exec**: returns the found text as an object else null. | ![](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/image-1620913349102.png) ![](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/image-1620913326276.png) | ```javascript __er.regularExpression("test", /expression/g, 'input'); ``` | ## Set Timeout This block calls a function or any code block after a number of milliseconds. | Input | Output | Block Layout | Generated Code | | --- | --- | --- | --- | | Time in milliseconds as a variable or number - input-1 Function or code as a statement block. | Returns a number, representing the ID value of the timer that is set. | ![SetTimeout](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/SetTimeout.png) | ```javascript setTimeout(async function(){}, 0); ``` | ## Set Interval This block executes any code block repeatedly for the specified interval time(in milliseconds). | Input | Output | Block Layout | Generated Code | | --- | --- | --- | --- | | Time in milliseconds as a variable or number - input-1, Function or code as a statement block. | NA | ![SetInterval](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/SetInterval.png) | ```javascript setInterval(async function(){}, 10); ``` | ## Set Timeout This block calls a function or any code block after a number of milliseconds. This block can be set to a variable(using a set block) and the variable can be used to cancel the timeout period. | Input | Output | Block Layout | Generated Code | | --- | --- | --- | --- | | Time in milliseconds as a variable or number - input-1 Function or code as a statement block. | Returns a number, representing the ID value of the timer that is set. | ![Settimeout-oval](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/Settimeout-oval.png) ![settimeout-settovariable](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/settimeout-settovariable.png) | ```javascript var item; async function er_1674710886_click(e,obj,index){ item = setTimeout(async function(){}, 0); } ``` | ## Set Interval This block calls a function or any code block at specified intervals(in milliseconds). This action block can be set to a variable(using a set block) and the variable can be used to cancel the interval period. | Input | Output | Block Layout | Generated Code | | --- | --- | --- | --- | | Time in milliseconds as a variable or number - input-1, Function or code as a statement block. | Returns an interval object | ![setinterval-oval](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/setinterval-oval.png) ![setinterval-settovariable](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/setinterval-settovariable.png) | ```javascript var item; async function er_1674710886_click(e,obj,index){ item = setInterval(async function(){}, 10); } ``` | ## Clear Interval The Clear Interval block clears a timer set with the setInterval block. | Input | Output | Block Layout | Generated Code | | --- | --- | --- | --- | | The ID value of the timer as variable or number. | Clears a timer set with the set Interval block using interval id. | ![ClearInterval](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/ClearInterval.png) | ```javascript clearInterval(); ``` | ## Clear Timeout The Clear Timeout block clears a timer set with the Set Timeout block. | Input | Output | Block Layout | Generated Code | | --- | --- | --- | --- | | The ID value of the timer as variable or number. | Clears a timer set with the set timeout block using timeout id. | ![ClearTimeout](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/ClearTimeout.png) | ```javascript clearTimeout(); ``` | ## JSON Parser The JSON Parse String block is used to parse a JSON string which is written in a JSON format and it returns a JavaScript object. | Input | Output | Block Layout | Generated Code | | --- | --- | --- | --- | | JSON value as variable or Text. | Returns JSON Object corresponding input text JSON. | ![JSONParse](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/JSONParse.png) | ```javascript __er.parseJSON('{}'); ``` | ## JSON Stringify The JSON Stringify block takes in a variable or object as an input and converts it into an equivalent string. | Input | Output | Block Layout | Generated Code | | --- | --- | --- | --- | | JSON Object as variable or Object value. | Returns Text JSON corresponding to the input JSON Object. | ![JSONStringify](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/JSONStringify.png) | ```javascript __er.JSONStringify() ``` |