Change the Value of an Extendable Constant

Constants may be used in dependencies to allow you to change the appearance of components and determine app behavior, such as changing component properties or input parameters, or enabling a feature in the page.

To change the value of an extendable constant:

  1. Open the page in the Page Designer.
  2. Do either of the following:
    • Select the component on the page to open the details pane for the component in the Properties pane. In this example, a constant is used to store the text for a Heading component that is visible in the Page Designer. You can change the heading by changing the constant's value:

      If the selected component uses a fragment, you can edit the fragment's input parameters. When a dynamic form or table has only one display rule (the default rule), or a rule that is always applied, you can edit fragment input parameters directly in the component's details pane:



      If you'd like to set different input parameter values, based on conditions, you can create new rules in the rules editor, and specify the input parameters. To open the rules editor, open the options menu in the Properties pane (…) and click Add Rule.

      If the component has more than one display rule that could be applied, the details pane has a link to open the component's rule set editor where you can edit the fragment's input parameters:



    • Open the Constants tab in the Properties pane. In this example, the Constants tab lists constants used in the page, but there is no component visible in the Page Designer. The constants are used to control elements in the page, for example, to control how components are rendered, or to enable and disable some function in the page.
      1. Click the constant to see its details in the Properties pane.

  3. Change the constant's value in the Properties pane by selecting a value in the dropdown menu or entering a value in the Values field.

    You can move your cursor over the tooltip icon to see details about the constant. In this example, the description states that the constant is used to enable inline editing of a table.



    To change the value of the constant, do one of the following:

    • Set a static value for the constant by typing a new value in the Value field.
    • Select a value using the UI component. For some constants, the Properties pane might display a component for selecting the value, for example, a date picker component for selecting a date. When the constant is a boolean, you might see a menu to select "true" or "false".
    • Set the value to a constant or variable. You can click the arrow above the field to open the Variables picker and select a variable:

      You can click Create Variable in the Variables picker to create a variable, if needed.

    • Set the value to an expression. You can click fx above the field to open the Expression Editor. To write efficient expressions that handle situations where a referenced field might not be available or the field's value could be null, see How To Write Expressions If a Referenced Field Might Not Be Available Or Its Value Could Be Null.

      In the Expression Editor, you can select variables in the left pane to add them to your expression. You can also add text strings to your expression by typing in the editor.