• 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

    Bug in script editor?

    Mango Automation general Discussion
    2
    6
    1.5k
    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.
    • P
      pyeager
      last edited by

      While working on a script, I discovered that not all of it was being saved.

      Every time I went to reopen it, it was truncated.

      If I enter the following script, it validates just fine:

      var sources = DataSourceQuery.query('like(name,polecat*VIRT)&limit(10)');
      for(var i = 0; i<sources.size(); i++ ) {
          var source = sources.get(i);
          print( source.name );
      }
      

      But if I save that script and then reopen it, here is what I find:

      var sources = DataSourceQuery.query('like(name,polecat*VIRT)&limit(10)');
      for(var i = 0; i
      

      Now if I modify the script slightly, like this:

      var sources=DataSourceQuery.query('like(name,polecat*VIRT)&limit(10)');
      for(var i=0; i < sources.size(); i++ ) {
          var source=sources.get(i);
          print( source.name );
      }
      

      ...the script opens properly after saving.

      What is the difference? It is:

      i<sources.size();
      

      ...which doesn't save properly, vs:

      i < sources.size();
      

      ...which does save properly
      What a difference a space or two makes!

      1 Reply Last reply Reply Quote 0
      • Jared WiltshireJ
        Jared Wiltshire
        last edited by

        Which script editor? New UI or legacy?

        Developer at Radix IoT

        1 Reply Last reply Reply Quote 0
        • P
          pyeager
          last edited by

          I think it is the legacy

          On my system it appears at http://intranet:8080/data_sources.shtm

          1 Reply Last reply Reply Quote 0
          • Jared WiltshireJ
            Jared Wiltshire
            last edited by

            What version of Mango are you using? Have you tried the new data source UI in 3.6?

            Developer at Radix IoT

            1 Reply Last reply Reply Quote 0
            • P
              pyeager
              last edited by

              I haven't tried 3.6 yet. Running the upgrades now.

              1 Reply Last reply Reply Quote 0
              • P
                pyeager
                last edited by

                The new data source UI doesn't seem to have the bug.

                Thanks!

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