|
This macro dynamically creates or modifies links between grid applications and other applications.
Column: Grid column field name to generate the link. Application: Application name to establish the link. Parameters: Parameters required by the called application.
Must be informed "=" (attribution sign) . More than one parameter must be separated by ";" (semicolon).
Hint: Observation or tip displayed when the mouse cursor passes over the link.
Target : Where the application will function call and may be:
Target
|
Descrição |
| "_self" |
For carrying on the same page (overrides the query); |
| "_blank" |
To run on another page (pop-up); |
| "iframeT" |
To run in an iframe above the Grid (top); |
| "iframeL" |
To run in an iframe, the left of the Grid (Left); |
| "iframeR" |
To run in an iframe, the left of the Grid (Left); |
| "iframeB" |
To run in an iframe below the Grid (Bot); |
| "modal" |
Opens a new window and blocks any interaction in the main window; |
In the case of modal target, there are two optional parameters *:
*Height: Set the height of the modal window (default 440); *Width: Set the width of the modal window (default 630);
Note: If omitted, will be assigned the value "_self".
Ex. 1: Creates a link to the costumer.php application, on the Id field, passing the global variable [global_costumer] as and the product field (local variable) {Id} to the costumer.php application: sc_link(Id, costumer.php, product=[global_costumer]; Id={Id}, "Client Data", "_blank");
Ex. 2: Creating a dynamic link to another application depeding on the field valor {costumer_type} and opening it in a modal. if ({costumer_type} == "F") { sc_link (costumer_type, type_f.php, product=[global_costumer]; Id={Id}," Personal Data ", "modal", 500, 700); } else{ sc_link (costumer_type, type_a.php, product=[global_costumer]; Id={Id}," Company Data ", "iframeR"); }
Ex. 3: Creating a link to an URL: in this case, "paramater and target" have no effect. It will be executed redirecting to a informed URL. sc_link (my_field, http://www.scriptcase.com, ,"hint of the link");
|