Skip to content

Latest commit

 

History

History
56 lines (32 loc) · 2.52 KB

step-3-changing-the-text-rule-configuration-1758e45.md

File metadata and controls

56 lines (32 loc) · 2.52 KB

Step 3: Changing the Text Rule Configuration

Text rule has a set of configurations that influence different aspects of the its functionality and the actions that business users can perform. Part of the configuration of the text rule can be exposed to the end user via the text rule Settings dialog box.

Text rule has a condition part (if, elseif) and the result parts (then, else). In this type of rule authoring, the user can create a text rule which has different semantic fonts, colors for vocabulary (data), grammar (reserved words), inline error highlighting and provides the autocomplete feature to support user input for the rules (condition & results).

If you are using a data object with reference attributes as the result data object, then the attributes of the target data object will also be displayed as result attributes. For more information on reference attributes, see Attributes in Data Objects.

You can view and download all files at Rule Builder - Text Rule.

<mvc:View
        xmlns:mvc="sap.ui.core.mvc"
        displayBlock="true"
        xmlns="sap.m"
        controllerName="sap.rules.ui.sample.TextRule.Page"
        viewName="sap.rules.ui.sample.TextRule.Page.view"
        xmlns:rules="sap.rules.ui">
    <Button id="editButton" press="handleEditButton" text="Edit"/>
    <rules:RuleBuilder id="ruleBuilder" types="TextRule" editable="true">
		<rules:textRuleConfiguration>
		<rules:textRuleConfiguration enableSettings="true" enableElseIf= "false"/>
		</rules:textRuleConfiguration>
    </rules:RuleBuilder>
</mvc:View> 

The enableSettings option is false by default and can be set to true which enables the Settings icon, and opens the Settings dialog box. The enableElse and enableElseIf options are true by default and can be set to false which disables the Else and ElseIf parts in the condition.

Multiple ElseIf statements can also be configured in the condition.