Skip to main content
ericm0008
November 23, 2021
Solved

How to redirect to a different Page on Site after submitting Form?

  • November 23, 2021
  • 10 replies
  • 1 view

I have a form that a user can fill out and submit on a site but when they click submit it refreshes and they stay on the same page. I would like to know how can I redirect the user to the home page or the the record page to the summary view, which is on the same site.

I tried the code below below but it doesn't work, probably the wrong way to implement.

primaryButtons: {
          a!buttonWidget(
            label: "Submit",
            value: a!richTextItem(
              link: a!recordLink(
                recordType: 'recordType![MyRecordType],
                identifier: ri!GARP_Grant_Request.grantID,
                dashboard: "the url for the site record page",
              )
            ),

Thanks for any help the community can provide.

Best answer by csteward

As others noted, standard functionality is to return to where you were when the process began.  For this reason, I'll sometimes display a confirmation form within the same edit process via chain from the Edit form, with navigation options such as below.  Note when the users click the Home Page link, the task for the process will remain in their queue so I typically implement something like a 15-30 minute orphan timer.

{
  a!richTextDisplayField(
    align: "CENTER",
    value: {
      char(13),
      a!richTextItem(
        text: "Your form has been submitted!",
        size: "LARGE",
        style: "STRONG"
      ),
      char(13),
      char(13),
    }
  ),
  a!columnsLayout(
    columns: {
      a!columnLayout(),
      a!columnLayout(
        contents: {
          a!cardLayout(
            style: "ACCENT",
            link:  a!submitLink( /* Close current process which will return to the start action */
              value: "NEW",
            ),
            contents: {
              a!richTextDisplayField(
                align: "CENTER",
                value: {
                  a!richTextIcon(
                    icon: "plus",
                    size: "LARGE"
                  ),
                  char(13),
                  a!richTextItem(
                    text: "Submit a new request",
                    size: "MEDIUM",
                    style: "STRONG"
                  ),
                  char(13),
                  char(13),
                }
              )
            }
          )
        }
      ),
      a!columnLayout(
        contents: {
          a!cardLayout(
            style: "ACCENT",
            link: {},/* a!safelink() to the app home page */
            contents: {
              a!richTextDisplayField(
                align: "CENTER",
                value: {
                  a!richTextIcon(
                    icon: "share",
                    size: "LARGE"
                  ),
                  char(13),
                  a!richTextItem(
                    text: "Process Home Page",
                    size: "MEDIUM",
                    style: "STRONG"
                  ),
                  char(13),
                  char(13),
                }
              )
            }
          )
        }
      ),
      a!columnLayout()
    }
  ),
  a!richTextDisplayField(
    align: "CENTER",
    value: {
      char(13),
      a!richTextItem(
        text: a!richTextItem(
          text: "Thank you for using ",
          style: "EMPHASIS"
        ),
        size: "MEDIUM",
        style: "STRONG",
        color: "SECONDARY"
      ),
      a!richTextItem(
        text: a!richTextItem(
          text: "[this application]",
          style: "EMPHASIS"
        ),
        size: "MEDIUM",
        style: "STRONG",
        color: "ACCENT"
      )
    }
  )
}

10 replies

stefanhelzle0001
Brainy
November 23, 2021

This is not supported in Appian. The only work around is to enable chaining in process and show the user an interface with a link to click.

ericm0008
ericm0008Author
November 23, 2021

Not even back to home page?

Thanks for response

stewart.burchell
November 23, 2021

The paradigm is always the same - when you run a process you are always returned to the place at which you initiated the process. 

What is your use case for starting a process in, say, a Record's Summary page and being returned to, say, the Record List...or even the home page of a Site? Why do you NOT want to be returned to the same place you started? Wouldn't the User Experience be confusing if you couldn't be sure of where you'd end up at after the process completed?