Skip to main content
October 27, 2023
Question

Just want to open a link in a New tab

  • October 27, 2023
  • 3 replies
  • 0 views

a!gridColumn(
                label: "Ticket Id",
                value: a!richTextDisplayField(
                  value: a!richTextItem(
                    text: fv!row.issueId,
                    link: a!dynamicLink(
                      saveInto: {
                        a!save(local!selectedTicketId, fv!row.issueId),
                        a!save(local!showDetailsPage, true()),
                        a!save(ri!showLinkedIssues, true()),
                        a!save(ri!newShowDetailsPage, false())
                      }
                    ),
                    linkStyle: "STANDALONE"
                  )
                )
              )


Can we open a dynamic link in a new tab or is there any way to open in new tab 

3 replies

October 28, 2023

To open a dynamic link in a new tab, you can use the HTML "target" attribute. You would need to modify the code you provided to include this attribute. Here's how you can do it:

  label: "Ticket Id",
  value: a!richTextDisplayField(
    value: a!richTextItem(
      text: fv!row.issueId,
      link: a!dynamicLink(
        saveInto: {
          a!save(local!selectedTicketId, fv!row.issueId),
          a!save(local!showDetailsPage, true()),
          a!save(ri!showLinkedIssues, true()),
          a!save(ri!newShowDetailsPage, false())
        },
        linkStyle: "STANDALONE",
        attributes: {
          target: "_blank"  /* This opens the link in a new tab */
        }
      )
    )
  )
)

By adding the "target" attribute with the value "_blank," the link will open in a new browser tab or window when clicked.

stefanhelzle0001
Brainy
October 28, 2023

Sorry to be this direct, but this is complete nonsense!

The documentation says: "Defines a link that triggers updates to one or more variables. Links can be used in charts, grids, hierarchy browsers, images, link fields, milestones, pickers, and rich text."

https://docs.appian.com/suite/help/23.3/Dynamic_Link_Component.html

Back to the initial question. As we just learned, a dynamic link does not navigate the user anywhere. Please help us to understand what you want to achieve, and I am sure we find a good solution for it.