How to Define Button Visibility in Model Classes
since 13.0
Dynamic hiding of buttons in a Model object allows for a tailored user experience by specifying which buttons to hide and when in the JSON definition of a Model Class. This configuration enables you to set criteria for when certain buttons should be hidden, ensuring that users are presented only with actions that are relevant to them.
The criteria defined in the JSON configuration are evaluated dynamically during each "refresh," ensuring that only applicable options are displayed to end users at all times. This configuration impacts both the buttons visible on the Detail page and the contextual buttons on the List page.
Note: On the list page you can have Models based on different Model Classes. Some of the Model Classes may use the JSON configuration to hide some context action buttons (Duplicate, Delete, etc.). When you select multiple Models where some have hidden buttons and some do not, the general rule is that when you select at least one Model which has a specific contextual button hidden, then the button is hidden for the whole selection.
The following buttons can be hidden in the JSON configuration (false = hidden):
"buttons": {
"saveButton": false,
"attachmentsButton": false,
"jobTrackingButton": false,
"viewTablesButton": false,
"calculationScheduleButton": false,
"viewOptionsButton": false,
"continueButton": false,
"executeAllNextStepsButton": false,
"reopenActionButton": false, // Action list view buttons
"markDoneActionButton": false,
"blockActionButton": false,
"postponeActionButton": false,
"rejectActionButton": false,
"deleteActionButton": flase,
"viewActionButton": false,
"editActionButton": false,
"asyncPublishingButton": false, // Rebate Record calculation view buttons
"exportCSVButton": false,
"editButton": false, // Rebate Record Chart view buttons
"asyncPublishingButton": false,
"exportSVGButton": false,
"exportPNGButton": false,
"exportJPEGButton": false,
"exportPDFButton": false,
"duplicateButton": false, // buttons on Models list page
"revokeWithConfirmationButton": false,
"deleteButton": false,
"exportButton": false,
"importButton": false,
"scheduleButton": false
},
Buttons can be hidden on tab or document (root) level. Criteria for dynamic display of buttons are defined in the same way as for tabs or steps, using hard-coded columns, attribute columns or attribute extensions.
See the following example:
{
"steps": [
{
"name": "DataScope",
"tabs": [
{
"name": "DataScope_Default",
"type": "dashboard",
"label": "Default",
"buttons": {
"saveButton": false,
"continueButton": false,
"viewTablesButton": false,
"attachmentsButton": false,
"jobTrackingButton": false,
"viewOptionsButton": false,
"calculationScheduleButton": false,
"executeAllNextStepsButton": false
},
"helpText": "help_test",
"formulaName": "ActIn_Datamart_ScopeData",
"helpTextTitle": "Data Scope is Empty"
}
],
"label": "Data Scope"
},
{
"name": "DetectionRules",
"tabs": [
{
"name": "DetectionRules_Default",
"type": "configurator",
"label": "Default",
"buttons": {
"saveButton": false,
"continueButton": false,
"viewTablesButton": false,
"attachmentsButton": false,
"jobTrackingButton": false,
"viewOptionsButton": false,
"calculationScheduleButton": false,
"executeAllNextStepsButton": false
},
"formulaName": "ActIn_Datamart_DetectionRules"
}
],
"label": "Detection Rules"
},
{
"name": "ActionDefinition",
"tabs": [
{
"name": "ActionDefinition_Default",
"type": "configurator",
"label": "Default",
"buttons": {
"saveButton": false,
"continueButton": false,
"viewTablesButton": false,
"attachmentsButton": false,
"jobTrackingButton": false,
"viewOptionsButton": false,
"calculationScheduleButton": false,
"executeAllNextStepsButton": false
},
"formulaName": "ActIn_Datamart_ActionDefinition"
}
],
"label": "Action Definition"
},
{
"name": "Summary",
"tabs": [
{
"name": "Summary_Default",
"type": "dashboard",
"label": "Default",
"buttons": {
"saveButton": false,
"continueButton": false,
"viewTablesButton": false,
"attachmentsButton": false,
"jobTrackingButton": false,
"viewOptionsButton": false,
"calculationScheduleButton": false,
"executeAllNextStepsButton": false
},
"formulaName": "ActIn_Datamart_Summary"
}
],
"label": "Summary",
"calculation": "ActIn_ResultsCalculation"
}
],
"tasks": [
{
"name": "schedulerTask",
"type": "post-approval-calculation",
"label": "Scheduler Task",
"buttons": {
"saveButton": false,
"continueButton": false,
"viewTablesButton": false,
"attachmentsButton": false,
"jobTrackingButton": false,
"viewOptionsButton": false,
"calculationScheduleButton": false,
"executeAllNextStepsButton": false
},
"calculation": "ActIn_ResultsCalculation"
}
],
"actions": [
{
"name": "schedulerAction",
"task": "schedulerTask",
"type": "task",
"label": "Scheduler Action",
"buttons": {
"saveButton": false,
"continueButton": false,
"viewTablesButton": false,
"attachmentsButton": false,
"jobTrackingButton": false,
"viewOptionsButton": false,
"calculationScheduleButton": false,
"executeAllNextStepsButton": false
}
}
],
"buttons": {
"saveButton": false,
"continueButton": false,
"viewTablesButton": false,
"attachmentsButton": false,
"jobTrackingButton": false,
"viewOptionsButton": false,
"calculationScheduleButton": false,
"executeAllNextStepsButton": false
},
"evaluations": [
{
"name": "ActIn_Evaluations",
"formulaName": "ActIn_Datamart_Evaluations"
},
{
"name": "ActIn_Data_Evaluations",
"formulaName": "ActIn_Datamart_Data_Evaluations"
}
],
"calculations": [
{
"name": "ActIn_ResultsCalculation",
"type": "formula",
"buttons": {
"saveButton": false,
"continueButton": false,
"viewTablesButton": false,
"attachmentsButton": false,
"jobTrackingButton": false,
"viewOptionsButton": false,
"calculationScheduleButton": false,
"executeAllNextStepsButton": false
},
"formulaName": "ActIn_Datamart_ResultsCalculation"
}
]
}
How button visibility is determined between root and step settings:
Button visibility is defined on step level → the button in this step behaves according to this definition.
Button visibility is not defined on the step level → the button behaves according to the root-level definition.
If button visibility is not defined neither on the root level, the button is displayed because no definition means that the button is always visible.Button visibility is defined on the root level → the button on the list page behaves according to this definition.
Button visibility is not defined on the root level → button is displayed on the list page.
Â
Found an issue in documentation? Write to us.
Â