• Recent
    • Tags
    • Popular
    • Register
    • Login

    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

    How to get / generate XID for PointEventDectors table?

    User help
    2
    4
    2.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jzwickerJ
      jzwicker
      last edited by

      We're looking to use a query such as:

      INSERT INTO POINTEVENTDETECTORS (
      XID,
      ALIAS,
      DATAPOINTID,
      DETECTORTYPE,
      ALARMLEVEL,
      LOWLIMIT,
      HIGHLIMIT,
      DURATION,
      DURATIONTYPE,
      BINARYSTATE,
      MULTISTATESTATE,
      CHANGECOUNT,
      ALPHANUMERICSTATE,
      WEIGHT
      ) VALUES (
      'PED_000001',
      'Testing1',
      '132',
      '12',
      '1',
      '18.0',
      '24.0',
      '5',
      '1',
      'N',
      '0',
      '2',
      '',
      '0.0'
      ), (
      'PED_000002',
      'Testing2',
      '132',
      '12',
      '1',
      '17.0',
      '25.0',
      '5',
      '1',
      'N',
      '0',
      '2',
      '',
      '0.0'
      );

      ...to insert point event detectors, however we can't seem to figure out where the XIDs are coming from? Any advice? Thanks!

      1 Reply Last reply Reply Quote 0
      • JoelHaggarJ
        JoelHaggar
        last edited by

        This seems like a less than ideal thing to do as you'll be bypassing the various Mango layers. Can you share what your use case would be or why you want to do this? The XIDs are randomly generated but need to be unique within the whole system.

        A much better method would be to use our RESTapi. I don't think we currently have a option for creating Event detectors but we intend to adding in features like that.

        1 Reply Last reply Reply Quote 0
        • jzwickerJ
          jzwicker
          last edited by

          Need to add hundreds, possibly thousands of event detectors and don't want to do it manually. We use macros, etc... to generate SQL queries based on point lists in Excel. This allows us to instantly setup the points, histories, event detectors, etc... without having to do the work.

          If there's a better way, please advise.

          1 Reply Last reply Reply Quote 0
          • JoelHaggarJ
            JoelHaggar
            last edited by

            In general doing direct database actions like this are not a good idea. If you were to do direct database inserts you would at least need to reboot Mango after to get all the changes loaded into Memory.

            The right way to do this is through our RESTful API. The feature isn't available right now but this is something we could add for you in the near future. You can contact us at support@infiniteautomation.com for more details.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post