Hyperlinking to open a Interface by Button

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 

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer

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

  • 0
    Certified Senior Developer

    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"
      )
    }
    

  •   

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

  • 0
    Certified Senior Developer
    in reply to farhanalam

    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?

  • 0
    Certified Associate Developer

    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.