Skip to main content
New Participant
September 4, 2023
Solved

Message on process success or error

  • September 4, 2023
  • 4 replies
  • 7 views

Hello,

I have an Interface. Within this interface user uploads excel file containing some emails. Next user submits excel and process model is started. 

Interface is published on a website. 

When user uploads excel and clicks submit interface looks exactly the same, no message if the process was successful or anything.

I would like to create new popup window or some message when user submits and run process with uploaded excel. 

I tried using onSuccess but it didn't work. Do you have any tips? 

My code looks like this: 

a!localVariables(
  local!cancel,
  local!WczytanePlik,
  local!NazwaPliku,
  local!Pracownicy: if(
    a!isNullOrEmpty(local!WczytanePlik),
    {},
    rule!EA_TEST(local!WczytanePlik)
  ),
  a!formLayout(
    label: "Wczytaj plik",
    contents: {
      a!sectionLayout(
        contents: {
          a!textField(
            label: "Nazwa pliku",
            labelPosition: "ABOVE",
            instructions: "Wprowadź nazwę pliku",
            value: local!NazwaPliku,
            saveInto: { local!NazwaPliku },
            refreshAfter: "KEYPRESS",
            required: true,
            validations: {},
            inputPurpose: "NAME"
          ),
          a!fileUploadField(
            label: "Plik",
            labelPosition: "ABOVE",
            instructions: "Wybierz plik z komputera",
            target: cons!EA_WCZYTANE_PLIKI_POINTER,
            fileNames: local!NazwaPliku,
            value: local!WczytanePlik,
            saveInto: {
              a!submitUploadedFiles(),
              local!WczytanePlik
            },
            required: true,
            validations: {}
          )
        }
      )
    },
    buttons: a!buttonLayout(
      primaryButtons: {
        a!buttonWidget(
          label: "Zapisz",
          submit: true,
          style: "PRIMARY",
          saveInto: {
            a!startProcess(
              processModel: cons!EA_send_email_wrapped,
              processParameters: { pracownicy: local!Pracownicy }
            )
          }
        )
      },
      secondaryButtons: {
        a!buttonWidget(
          label: "Anuluj",
          value: true,
          saveInto: local!cancel,
          submit: true,
          style: "NORMAL",
          validate: false
        )
      }
    )
  )
)

Best answer by stefanhelzle0001

Components in Appian can be shown/hidden on a condition. The parameter is "showWhen". Create a local variable and give it the value "false". In the button, switch it to "true". Then create a separate section and use that local to make it visible after the button is clicked.

4 replies

stefanhelzle0001
Brainy
September 4, 2023

Components in Appian can be shown/hidden on a condition. The parameter is "showWhen". Create a local variable and give it the value "false". In the button, switch it to "true". Then create a separate section and use that local to make it visible after the button is clicked.

New Participant
September 5, 2023

That works. Thank you.

anmolv0003
Participating Frequently
September 4, 2023

Hi , You can add a confirmation message pop up in a!buttonWidget using confirmHeader, confirmButtonLabel fields.

Anmol
stewart.burchell
Employee
September 5, 2023

You can, but this is a pre-execution confirmation (that is: the user is being asked to confirm the action they just requested) as opposed to a post-execution confirmation (e.g. "Your file has been successfully uploaded"). It's the latter which is what I understand [mention:118b3919a1c74bd5b9276e7f9ba4ba10:e9ed411860ed4f2ba0265705b8793d05] was asking for.