| **Navigation:**  [[templates.htm|Templates]] > [[tlrcontents.htm|Template Language Reference]] > Complete Alpha Listing >====== #INVOKE (insert code from a named #GROUP) {{c6h0068.jpg|C6H0068.jpg}} ====== | [[ insert insert code from a group .htm|{{btn_prev_n.gif|Previous page}}]][[tlrcontents.htm|{{btn_home_n.gif|Return to chapter overview}}]][[ localdata default local data declarations .htm|{{btn_next_n.gif|Next page}}]] | | || **#INVOKE(** //symbol //[, //parameters// ] **) **[, //returnvalue// ] [, **NOINDENT **] {{blk2blue.jpg|blk2blue.jpg}} | **#INVOKE** | Inserts code from a named #GROUP. | | //symbol// | A symbol containing the name of a #GROUP section (including the #TEMPLATE to which it belongs). | | //parameters// | The parameters passed to the #GROUP. Each parameter must be separated by a comma. All parameters defined for the #GROUP must be passed; they may not be omitted. | | //returnvalue// | A symbol to receive the value returned by the #RETURN statement. | | **NOINDENT** | Specifies the code inserted retains the indention in its #GROUP--any source in column 1 in the #GROUP is generated into column 1, no matter where the #INSERT is placed. | The **#INVOKE** statement places, at the exact position the #INVOKE is located within the Template code, the code from the #GROUP named in the //symbol//. The //symbol// must contain the name of a #GROUP, including the #TEMPLATE set to which it belongs. The main difference between #INVOKE and #CALL is the //symbol// parameter, which is a variable containing the #GROUP to call in #INVOKE and a constant naming the #GROUP to call in #CALL. The //parameters// passed to the #GROUP fall into two categories: value-parameters and variable-parameters. Value-parameters are declared by the #GROUP as a user-defined symbol, while variable-parameters are declared by the #GROUP as a user-defined symbol with a prepended asterisk (*). Either a symbol or an expression may be passed as a value-parameter. Only a symbol may be passed as a variable-parameter. The //returnvalue// symbol receives the value returned by the #GROUP from the #RETURN statement that terminates the #GROUP. If the #GROUP does not contain a #RETURN statement, or that #RETURN does not have a parameter, then the value received is an empty string (''). **Example:** **#SET(%SomeGroup,'%GenerateFormulas(Clarion)') #!Set variable to a #GROUP name** **#INVOKE****(%SomeGroup)** **#SET(%SomeGroup,'%FileRecordFilter(Clarion)') #!Set variable to another #GROUP name** **#INVOKE****(%SomeGroup,%Secondary)                #!Insert #GROUP with passed parameter** **#INVOKE****(%SomeGroup,%Primary,%Secondary)       #!#GROUP with two passed parameters** **See Also:**     [[ group reusable statement group .htm|#GROUP]] ,[[ insert insert code from a group .htm|#INSERT]] ,[[ call insert code from a group without indention .htm|#CALL]] ,[[ return return from group .htm|#RETURN]]