• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Check If an App Is Running Before Launch It

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Check If an App Is Running Before Launch It

    Sometimes I have the situation where it would be nice to be able to check if an app is running before launching an app. Maybe I'd like to display a warning when the app being launched is already open and allow the user to confirm whether to reload the app (or to simply go to the already open app without reloading). Technically, I can check this using the Valence.Util.App.isRunning function, but the problem I have with that right now is that it takes the app ID as a parameter which can change when the app is exported to another instance. A potential solution could be for the Set App Variables action to have the capability to choose from the available apps in a dropdown (like the Launch App action does) which would get that apps ID. Something like this or similar would be nice to have.

    I could use VVAPPS table to map the app name to its app ID, but that doesn't seem like the best long term solution.

    Thanks?

  • #2
    In the next 6.3 update you will be able to pass the name of the application to Valence.util.App.isRunning

    Example
    Code:
    if (Valence.util.App.isRunning('Portal Admin')) {
        // app is running in the portal
        //
    } else {
        // app is not running in the portal
        //
    }

    Comment


    • #3
      That is great, thank you!

      Comment

      Working...
      X