Skip to main content
July 31, 2024
Question

Hyperlinking to open a Interface by Button

  • July 31, 2024
  • 5 replies
  • 0 views

I want be hyperlink by button to open a interface of the same project Interface in same tab. Please provide me complete code how to link by one interface Button to open another interface. Thanks & regards 

    5 replies

    stefanhelzle0001
    Brainy
    July 31, 2024

    Can you describe in more detail what you want to achieve?

    July 31, 2024

     

    I have these two button at my interface by which I want hyperlink to open another interface by clicking these button.

    konduruc733182
    July 31, 2024

    You can display interfaces on a conditional basis.

    a!localVariables(
      local!selectedPage:3,
      {
        a!buttonArrayLayout(
          buttons: {
            a!buttonWidget(
              label: "Teachers",
              value: 1,
              saveInto: local!selectedPage,
              showWhen: not(contains(local!selectedPage,1))
            ),
            a!buttonWidget(
              label: "Student form",
              value: 2,
              saveInto: local!selectedPage,
              showWhen: not(contains(local!selectedPage,2))
            ),
            a!buttonWidget(
              label: "Back home",
              value: 3,
              saveInto: local!selectedPage,
              showWhen: not(contains(local!selectedPage,3))
            )
          }
        ),
        choose(
          local!selectedPage,
          a!sectionLayout(
            contents: a!richTextDisplayField(
              label: "Replace this component with your first interface"
            )
          ),
          a!sectionLayout(
            contents: a!richTextDisplayField(
              label: "Replace this component with your Second interface"
            )
          ),
          a!sectionLayout(
            contents: a!richTextDisplayField(
              label: "Replace this component with your Third interface"
            )
          )
        )
      }
    )

    Re-adjust the code according to your requirement. I would ask what does the student for show?

    konduruc733182
    July 31, 2024

    You cannot do that using button.

    But what is the interface that you want to open? Is it a record Summary? Below is a code for opening external link. you can replace it with a!recordLink() if you are talking about opening a summary interface.

    /*external URL*/
    {
      a!cardLayout(
        contents: {
          a!richTextDisplayField(
            labelPosition: "COLLAPSED",
            value: {
              "Open Link"
            }
          )
        },
        link: a!safeLink(
          label: "Safe Link",
          uri: "https://community.appian.com/discussions",
          openLinkIn: "SAME_TAB"
        ),
        height: "AUTO",
        style: "TRANSPARENT",
        marginBelow: "STANDARD"
      )
    }
    
    /*Record Link*/
    {
      a!cardLayout(
        contents: {
          a!richTextDisplayField(
            labelPosition: "COLLAPSED",
            value: { "Open Link" }
          )
        },
        link: a!recordLink(
          recordType: "Your record Type",
          identifier: "Primary_key_field",
          openLinkIn: "SAME_TAB"
        ),
        height: "AUTO",
        style: "TRANSPARENT",
        marginBelow: "STANDARD"
      )
    }
    

    prasantap0900
    August 1, 2024

    You can use card layout and there in the link option you can configure a!safeLink. In that link component you can see the parameter URL. Place your required interface's url in that option.