sc_actionbar_hide("button_name")

This macro hides the button created on the action bar, which can be displayed again with the sc_actionbar_show macro.

This macro can be used with any type of button (link or ajax) created in the action bar.

Parameter definition

Parameter Syntax Description
button_name

It is not possible to use variables. The button name must be informed using double quotes or single quotes.

 

Example
sc_actionbar_hide("ajax_btn");

This parameter is mandatory.

We must inform the name of the action bar button that must be hidden.

 

Exemplos


 

Example 1: Basic macro usage

sc_actionbar_show("button_name");

 

Example 2: Showing the order detail link button if there are any records to show.

// Example created in the onRecord event of the query using the order and orderdetail table
// If there are no items in the order, the detail link button will be hidden.

$query = "SELECT count(*) FROM OrderDetails WHERE OrderID =" . {OrderID};
sc_lookup(ds, $query);

if ({ds[0][0]} == 0) {

     //Example of using the macro sc_actionbar_hide
     sc_actionbar_hide("button_name");

} else {

     sc_actionbar_show("button_name");

}