Timer in SAIL

Certified Senior Developer

Hi Folks,

In my interface if i delete anything i want to display a banner says Success!(Image added below)

One i click delete as soon as the banner should display and after 5 seconds the banner should hide. how to achieve it.

i have gone through with refresh Interval it did not worked as i expected. any plugin or anything  

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer
    t did not worked as i expected

    It is not clear what you mean by this.

    The minimum refresh interval is 30 seconds.

  • 0
    Certified Lead Developer
    after 5 seconds the banner should hide

    5 seconds is not possible, minimum 30s you can configure. Possible alternatives are

    • Provide a link or button to user saying 'Dismiss' and when they click the banner hides. There is a pattern 'Action Banner' in interface for this behaviour which you can check as reference. If user click is not accepted by users then,
    • Have the refresh depend on the main variable changes in your UI. So if user interacts to modify some variable that toggles the showWhen for this banner.

    In case user doesn't delete anything and the banner refreshes in interval is not optimal from performance perspective anyway! 

  • 0
    Certified Lead Developer

    You can achieve this using the plugin below. I tried it in my environment and it worked for me.
    Deploy this plugin and test the attached code below. It should work.

    https://community.appian.com/b/appmarket/posts/auto-hide-text




    a!localVariables(
      local!showSuccess: false,
      {
        /* Delete Button - Wrapped in buttonLayout */
        a!buttonLayout(
          primaryButtons: a!buttonWidget(
            label: "Delete",
            style: "GHOST",
            saveInto: {
              a!save(local!showSuccess, true)
              /* Add your delete logic here */
            }
          )
        ),
    
        /* Auto Hide Success Banner */
        autoHideTextDisplayField(
          icon: "fa fa-check-circle",
          information: "Success!",
          textBackgroundColor: "SUCCESS",
          textColor: "STANDARD",
          standbyTime: 5,
          showBannerValue: local!showSuccess,
          showBannerSaveInto: local!showSuccess,
          iconColor: "POSITIVE",
          textStyle: "EMPHASIS"
        )
      }
    )


    Let me know if you need any inputs.