Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Work Tasks

Button

  • Last UpdatedSep 12, 2024
  • 8 minute read

Use Button control to perform an action in your form. You can display both text and image on the control.

Properties

The properties for the control are grouped under the following tabs:

Basic

Property

Description

Name

Name that identifies the control. This value is also used for the label of the control.

XML Node

XML node mapped to the control. Use this value to map a list to a form and a form to a workflow.

  • Prefix with @ to use the value of the control as an attribute with the immediate parent node. For example, @FirstName.

  • Use / for a parent-child node configuration to uniquely identify a control in a form with multiple containers. For example, Employee/FirstName.

Note:
- If you use / to denote a parent which is not a container and the parent is at the same level as that of the child, then the XML node for the control is not generated.
- If you edit this value later, then it might affect the mapping between forms, lists, and workflows.

Description

Description for the control.

Tooltip

Message that appears when the pointer hovers over the control.

Button Text

Text for the control.

Note:
- This value is required when the control is used with the Possible Distinct Outputs property for Invoke Form activity of the workflow.
- For information about Invoke Form activity and Possible Distinct Outputs, see Invoke Form Activity in Developer Guide.

Button Type

Action for the control.

  • Select Submit to allow the control to submit the form.

  • Select Validate to allow the control to validate controls on the form.

  • Select Cancel to allow the control to close or reload the form.

  • Select Custom to allow the control to perform custom actions on the form.

  • Select Print to allow the control to print the form. This feature is not available for mobile devices.

  • Select the Navigate option to navigate to another form.

    The default value is Custom.

    When you select Print, the Print Form option appears. You can link a form that you want to print.

To link a form that you want to print

  1. Click the Print Form button. The Form Details Configuration page appears.

  2. In the Form Name box, click a form name.

  3. In the Form Version box, click a form version.

  4. Click Save & Continue. The selected form is linked to the control, and the Form Details Configuration page is closed.

    When you select Navigate, the Navigate To Form option appears. You can navigate to another form, from the current form.

To navigate to a form

  1. Click the Navigate to Form button. The Form Details Configuration page appears.

  2. In the Form Name box, click a form name.

  3. In the Form Version box, click a form version.

  4. Click Save & Continue. The selected form is embedded in the current form, and the Form Details Configuration page is closed.

    Note:
    - If the value is Validate and the Form Button property is set to Yes, then the control will validate all the controls on the form.
    - If the value is Validate, the Form Button property is set to Yes, and the control is placed on Tab, then the control will validate all the controls on the Tab.
    -If the value is Cancel and the form is loaded in a separate window, then the control closes the form.
    - If the value is Cancel and the form is loaded within an existing window (inline), then the control reloads the form.
    - If the value is Custom, then the control will perform custom actions on the form as per the script set for the On Click property of the control.
    - The Print feature is not supported in mobile devices.
    - The Navigate feature is applicable for Form Links.

    - Consider a scenario where a Button control of Button Type Navigate is consumed in a pop-up form. To close the pop-up form, use a custom button and use the SFU.closeForm API in the form to be navigated to. If you are using Invoke Workflow to invoke a workflow, call the SFU.closeForm API in the post-execution script of the Invoke Workflow.
    You can close the pop-form using this API only if the Open New Window property of the Pop-Up control is set to YES. However, if the value of this property is set to NO, then the pop-up form does not get closed.

    - Ensure that the form you want to navigate to is published, before it is consumed during runtime.

    - Forms parameters are not supported for the Navigate option.


    - Consider a scenario where a script is written for the On Click event with the Button Type property set to Navigate and the On Click script makes an AJAX call to a web API. If the AJAX call is Synchronous, the navigation to another form will happen only after the response from the Web API is received. However, if the AJAX call is Asynchronous, the navigation might happen before the response from the Web API is received.

    - Consider a scenario where 'Form1' has been configured to navigate to 'Form2'. If you preview the 'Form1' and click the Navigate button, the 'Form2' will be displayed. However, if you try to submit the 'Form2', the instance xml will not be displayed.

    - The form configured as Navigate To option is a Fill form type. If there is Submit button for that form, then associate a workflow to the form.

    Appearance

    Property

    Description

    Enable

    Enable or disable the control.

    • Select Yes to enable the control.

    • Select No to disable the control.

      The default value is Yes.

    Visible

    Show or hide the control.

    • Select Yes to show the control.

    • Select No to hide the control.

      The default value is Yes.

    Label Position

    Position of the label for the control.

    • Select Default to allow the system to align the label. The system aligns the label to the left of the control or as specified by the container control.

    • Select Left to align the label to the left of the control.

    • Select Top to align the label to the top of the control.

    • Select Right to align the label to the right of the control.

    • Select Bottom to align the label to the bottom of the control.

    • Select Suppress to hide the label for the control.

      The default value is Default.

    Note:
    - If the value is Default and the control is placed on a container control, then the value of the Label Position property of the container control determines the position of the label for the control.
    - For example, if the value is Default and the control is placed on a Base Form with Label Position property set to Top, then the label is aligned to the top of the control.

    Label-Control Area

    Area occupied by the label and the control in percentage.

    • Select Default to allow the system to set the label and the control areas.

    • Select Custom to specify the label area. The control area is automatically set based on the label area.

      The default value is Default.

    Note:
    - If the value is Default and the control is placed on a container control, then the value of the Label-Control Area property of the container control determines the area of the label for the control.
    - This is applicable only when the Label Position is set to Left or Right.

    Alignment

    Alignment of the control with respect to the form.

    • Select Default to allow the system to align the control. The system aligns the control to the left of the form or as specified by the control.

    • Select Left to align the control to the left of the form.

    • Select Right to align the control to the right of the form.

    • Select Center to align the control to the center of the form.

    Retain Space

    Reserve or remove space when the control is hidden.

    • Select Yes to keep space when the control is hidden.

    • Select No to remove space when the control is hidden.

      The default value is No.

    Display Mode

    Show text and/or image for the control.

    • Select Text Only to show only text for the control.

    • Select Image Only to show only image  for the control.

    • Select Text and Image to show both text and image for the control.

      The default value is Text Only.

    Button Size

    Size of the button for the control.

    • Select Standard to set the size of the control to 120 x 32 pixels.

    • Select Small to set the size of the control to 30 x 30 pixels.

    • Select Medium to set the size of the control to 180 x 86 pixels.

    • Select Large to set the size of the control to 280 x 130 pixels.

      The default value is Standard.

    Image Path

    Path to the image for the control.

    The image path is specified as:

    • xxx.

      We recommend the following image sizes when the Display Mode property is set to Image.

    • Small – 30 x 30 pixels.

    • Medium – 180 x 86 pixels.

    • Large – 280 x 130 pixels.

      We recommend the following image sizes when the Display Mode property is set to Text and Image.

    • Small – 30 x 30 pixels.

    • Medium – 40 x 40 pixels.

    • Large – 50 x 50 pixels.

      Note:
      - This property is applicable only when the Display Mode property is set to Image or Text and Image, and the Button Size property is set to SmallMedium or Large.
      - If the Display Mode property is set to Text and Image and the Button Size property is set to Small, then only the image is displayed.

    Image Position

    Position of the image with respect to the text for the control.

    • Select Left to align the image to the left of the text for the control.

    • Select Right to align the image to the right of the text for the control.

    • Select Top to align the image to the top of the text for the control.

    • Select Bottom to align the image to the bottom of the text for the control.

      The default value is Left.

    Note: This property is applicable only when the Display Mode property is set to Text and Image.

    Show as Link

    Enable or disable the control to show as link.

    • Select Yes to enable the control to show as link.

    • Select No to disable the control to show as link.

      The default value is No.

    Validation

    Property

    Description

    Show Confirmation Message

    Show or hide the confirmation message for the control.

    • Select Yes to show the confirmation message for the control.

    • Select No to hide the confirmation message for the control.

      The default value is No.

    Confirmation Message Text

    Confirmation message for the control.

    Note: This property is applicable only when the Show Confirmation Message property is set to Yes.

    Advanced

    Property

    Description

    On Click

    Run a script when a button is clicked.

    For more information, see scripting guidelines for On Click property.

    ID

    Reference identification code for the control. This value is automatically generated and cannot be changed.

    Form Button

    Enable or disable the control to act as form button. When this property is enabled, the control is displayed at the bottom-right corner of the form.

    • Select Yes to enable the control to act as form button.

    • Select No to disable the control to act as form button.

      The default value is No.

    Note: If the value is Yes, and the form is viewed on a mobile device, then the control appears in the Action Bar of the mobile device.

    Scripts

    For information about using scripts, see scripting guidelines for Button property.

    Note:
    - Pop-Up control does not support Print Button control when the Persist Form Definition property is set to Yes.
    - Label controls with long text display a blank page in print preview when using a Button control with Print as the Button Type in the Mozilla Firefox browser.

    Related Links
    TitleResults for “How to create a CRG?”Also Available in