View actions
To define view actions, add a node to the selected view node in the Mobile configuration. These actions are supported:
- ListValueFilter: Used to filter the records that are displayed in popup lists.
- SetControlAttribute: Used to set the values of control attributes dynamically.
- ShowTab: Used to show or hide tabs in the mobile app.
The condition for a view action can be set in these ways:
- You can use an AccessTemplateCondition attribute to evaluate a specified permission in Infor Operations and Regulations Access Control. For example, the template
CDR/Building/Application Types/{ApplicationType.Code}/Application/View Application/View Attachments/View Attachmentscan be used to limit access to the Attachment tab in the building application viewer.To see the tab, a user must be granted the View Attachment permission for the application type. Because it uses a placeholder for the application type, the template applies to the View Attachments permission for all building application types.
- You can use a combination of a ConditionBind attribute and a ConditionBindValue attribute. The ConditionBind attribute specifies a property of the parent view's model that will be evaluated, and the ConditionBindValue attribute specifies the value that the property must match.
- You can use a ConditionExpression attribute to specify an expression that will be evaluated to determine if the condition is met.
ListValueFilter
For a ListValueFilter action, the values that are displayed in the list can be filtered in these ways:
- You can use the AccessTemplateListFilter attribute to filter the values based on the user's permissions in Access Control. Like the AccessTemplateCondition attribute, the AccessTemplateListFilter attribute specifies the path to a permission in Access Control that the user must be granted.
- You can use a regular expression to return a list of values.
- You can use the Values attribute to specify your own list of values.
SetControlAttribute
For a SetControlAttribute action you specify a control in the parent view and the attribute whose value you want to set if the condition is met. To set the value you can use the AttributeValue attribute to specify the value that you want to use, or you can use the AttributeValueExpression attribute to specify an expression to select the correct value.
ShowTab
For a ShowTab action you use the Show attribute to indicate whether the specified tab should be shown or hidden if the condition is met. Most tabs are visible by default, so you would set the value to False to hide a tab.
If the Show attribute is set to False, and you are using the AccessTemplateCondition attribute to set the condition, then you must also set the InverseCondition attribute to True. The InverseCondition attribute reverses the evaluation of the condition. The AccessTemplateCondition attribute checks for users who have the specified permissions, but the tab is to be hidden for users who do not have those permissions, so the condition must be reversed.
See ViewActions node.