Showing an interface on clicking submit button

I want to call an interface when i hit the approve button.

It means ,if approver hits the approve button,another screen will pop below the approver screen for assigning it to the analyst.

If it approve is true then this screen will be shown or else it will go the the analyst to restart the workflow.

Quick responses are welcome!!!

  Discussion posts and replies are publicly visible

  • Hi shweta,

    You can user buttonWidget,

    Lets say an Interface A has button B on click of the button B you need to display a new section Section C under the Button B so Design a rule for Section-C

    and dynamically display this interface based on the button value.

    you can have look at the below SAIL recipe.

    https://docs.appian.com/suite/help/19.1/recipe_build_a_wizard_in_sail.html 

  • 0
    Certified Lead Developer

    I'm a bit vague on your requirement still but I expect this example might be a good starting point for you:

    load(
      local!enteredData: null(),
      local!approveClicked: false(),
      local!selectedAssignee: null(),
      
      a!formLayout(
        label: "Approval Form",
        contents: {
          a!textField(
            label: "Enter some Details",
            disabled: local!approveClicked,
            value: local!enteredData,
            saveInto: local!enteredData,
            required: true()
          ),
          a!buttonArrayLayout(
            buttons: {
              a!buttonWidget(
                label: "Approve",
                value: true(),
                submit: false(),
                validate: true(),
                saveInto: local!approveClicked,
                disabled: local!approveClicked
              )
            }
          ),
          a!sectionLayout(
            label: "Assignment",
            showWhen: local!approveClicked,
            contents: {
              a!pickerFieldUsers(
                label: "Choose Assignee:",
                labelPosition: "ADJACENT",
                value: local!selectedAssignee,
                saveInto: local!selectedAssignee,
                required: true()
              ),
              a!buttonArrayLayout(
                align: "END",
                buttons: {
                  a!buttonWidget(
                    submit: true(),
                    label: "Assign",
                    style: "PRIMARY"
                  ),
                  a!buttonWidget(
                    submit: false(),
                    label: "Cancel",
                    style: "SECONDARY",
                    saveInto: {
                      a!save(
                        local!approveClicked,
                        false()
                      )
                    }
                  )
                }
              )
            }
          )
        }
      )
    )

    Note, in a real task some of the local variables would need to be switched out with RI variables to be able to pass data back into your process flow - but this just requires a simple swap.