dynamic link actions

how to show a confirmation message when performing action by using dynamic link?

  Discussion posts and replies are publicly visible

  • 0
    Certified Associate Developer

    Hi Raviteja, you can refer the code mentioned below.

    a!localVariables(
      local!showConfirmation_bool : false(),
      {
        a!cardLayout(
          showWhen: local!showConfirmation_bool,
          contents: {
            a!richTextDisplayField(
              value: {
                a!richTextItem(
                  text: "CONFIRM"
                )
              }
            )
          },
          link: {
            a!dynamicLink(saveInto: {
              a!save(
                local!showConfirmation_bool, false()
              )
            })
          }
        ),
        a!cardLayout(
          link: a!dynamicLink(
            saveInto: {
              a!save(
                local!showConfirmation_bool, true()
              )
            }
          ),
          showWhen: not(
            local!showConfirmation_bool
          ),
          contents: {
            a!richTextDisplayField(
              value: {
                a!richTextItem(
                  text: "SHOW CONFIRM Window"
                )
              }
            )
          }
        )
      }
    )

  • 0
    Certified Lead Developer

    Step 1: go to my existing feature request thread

    Step 2: click "like", click "i have this question too", add a comment detailing your use case in case anyone at Appian ever sees it (and adding a comment will float it back to the top of Community, which might help)

    Step 3: wait long enough for this to make it off their backlog.  I've been waiting 3 years so far, so....

    Note:  I do like the workaround that @harshjan already posted above, though it's a lot of manual work and juggling to make sure that sort of thing functions as desired, when (to me) there should just be built-in functionality that replicates how it works for buttons and a!submitLink().