If needed, default action views can be hidden or shown.
When an action is rendered with a default action view (for example, by a button on the action frame of a destop front-end, or in the top action panel on a mobile front-end), it is sometimes required to hide the action button when the operation is not possible and there is not much space on the screen.
BEFORE INPUT
CALL DIALOG.setActionHidden( "zoom", TRUE )
FUNCTION cust_dialog_setup(d)
DEFINE d ui.Dialog
DEFINE can_modify BOOLEAN
LET can_modify = (cust_rec.is_new OR user_info.is_admin)
CALL d.setActionActive("update", can_modify)
CALL d.setActionHidden("update", IIF(can_modify,0,1))
CALL d.setActionActive("delete", can_modify)
CALL d.setActionHidden("delete", IIF(can_modify,0,1))
...
END FUNCTION
DIALOG ATTRIBUTES(UNBUFFERED)
...
BEFORE DIALOG
CALL DIALOG.setActionHidden( "print", TRUE )
...
ON ACTION query
-- query the database and fill the record
...
CALL DIALOG.setActionHidden( "print", (cust_id IS NULL) )
...
END DIALOG