Skip to main content
November 7, 2022
Question

Process model hit by dropdown value

  • November 7, 2022
  • 10 replies
  • 0 views

Any example to hit process model through dropdown value in Interface

    10 replies

    November 7, 2022

    Hi, no we can not EDIT: synchronously start a process on dropdown selection.  

    Check this link  Ways to start a process model in Appian

    stewart.burchell
    November 7, 2022

    Well...that's not quite true. You can start a process - albeit asynchronously - from within any saveInto:{} construct in the UI. The process will be started in the background so the user will not, for example, be presented with a modal UI or interact immediately with that process.

    November 7, 2022

    Yes we can do that I focused on the below line as she wants to perform some action just after the selection I mean call a process synchronously 

    hit process model through dropdown
    csteward
    November 7, 2022

    As Stewart mentions, you can certainly start a process asynchronously via the dropdown's saveInto, such as:

    a!localVariables(
      local!options: {"Red","Blue","Green"},
      local!selection,
      local!processStarted,
      
      a!dropdownField(
        label: "Dropdown",
        placeholder: "-- Select --",
        choiceLabels: local!options,
        choiceValues: local!options,
        value: local!selection,
        saveInto: {
          local!selection,
          if(
            local!selection="Green",
            a!startProcess(
              processModel: cons!YOUR_PM_HERE,
              onSuccess: a!save(local!processStarted,true),
              onError: a!save(local!processStarted,false)
            ),
            {}
          )
        }
      )
    )

    mikes0011
    Brainy
    November 7, 2022

    I worry that the previous replies here are, perhaps, "putting the cart before the horse", i.e. reading details into the request that it might not necessarily be asking.

    Can you clarify a bit what exactly you intend by "hit process model through dropdown value"?  For example, if you want a user to be able to select a dropdown in one interface, then submit the form, then subsequently in that process flow, choose a subprocess depending on what value was chosen, that's fairly easy, and basically considered as "classic functionality" - you'd just have an XOR gateway choosing the process flow to execute based on what value had been provided by the user.

    If you mean something else, something more complicated or something more reliant on newer functionality, then you'll need to provide considerably more detail behind what you're thinking of trying to accomplish, than a single phrase.

    The Expression Guru