• Recent
    • Tags
    • Popular
    • Register
    • Login
    1. Home
    2. Matias Saul
    3. Topics

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website
    M
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 5
    • Posts 11
    • Groups 0

    Topics

    • M

      Script Side Functions list

      Watching Ignoring Scheduled Pinned Locked Moved Scripting general Discussion
      2
      0 Votes
      2 Posts
      1k Views
      phildunlapP
      Hi Matias, To a full list, that's a very large question! I assume you mean scripting data sources, meta points, event handlers, excel reports and such. Scripts can invoke Java code, so they can do most anything! The most authoritative documentation for the possibilities within the Mango codebase would be our Github: https://github.com/infiniteautomation/ma-core-public Of course, there are some script utilities that are documented in the contextual help, or here: https://help.infiniteautomation.com/about-mango-java-script So far as the actual task you mention, I need to make some scripts verifying the last login time of some users You have a couple options of varying complexity. Query for user login events and check that the users in question have logged in at whatever is the appropriate time period. While there is not an events script utility yet, I have answered questions about querying the events from scripts before on the forum. for instance this thread which sends an email of the last day's DATA_POINT type event: https://forum.infiniteautomation.com/topic/3147/email-last-day-s-events Have an event handler on user login events zero out a virtual data point that increments on some interval and has a limit detector that sends an email they've not logged in for X period of time. Since all user login events would be handled by the same event handler it will take some scripting to parse which user has logged in from the evt.message or use a no update detector on that point and set it to the login time when they login. Put a button on a dashboard that they have to hit to zero out their time-since-active incrementing virtual point which has the limit detector, like (2), or the button updates a point with a no update detector. Script for (2), in an event handler for user login events to get the username: //English translation only, some other regex or string splitting if other language var username = /User (.*?) logged in/.exec(event.message)[1];
    • M

      Spanish Translation

      Watching Ignoring Scheduled Pinned Locked Moved Development general discussion
      8
      0 Votes
      8 Posts
      3k Views
      Jared WiltshireJ
      @jflores13 Thanks for joining! I have done an automatic machine translation as a starting point, should make it much easier for you guys.
    • M

      Create an Email Template for Event Handler

      Watching Ignoring Scheduled Pinned Locked Moved Scripting general Discussion
      8
      0 Votes
      8 Posts
      3k Views
      M
      Thanks !! That did the trick...
    • M

      Log who change a point value

      Watching Ignoring Scheduled Pinned Locked Moved Mango Automation general Discussion
      4
      0 Votes
      4 Posts
      2k Views
      phildunlapP
      From that statement alone I don't know what you are trying to do. If you haven't seen it, you can set the annotation and the timestamp with the set value. There are three set functions on context points: set(value); //set the value at the timestamp that triggered the script //set a value at a timestamp. If the "saves historic" is not checked on the scripting data source, this will // go through the DataPointRT's savePointValue method, which has some logging subtleties set(value, timestamp); set(value, timestamp, annotation); //just like previous, but with annotation as well So a meta point could have a script like, my.set(p1.value, p1.time, "custom-annotation"); return UNCHANGED; Which would have the meta point have the same value at the same time as the context point, but with the custom annotation.
    • M

      Change the order of Graphic View screens

      Watching Ignoring Scheduled Pinned Locked Moved User help
      5
      0 Votes
      5 Posts
      2k Views
      G
      Thank you, it works in my sandbox Mango environment! :) You just saved me 4 hours of exporting-textediting-deleting-importing-testing nightmare! Thanks again!