• 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

    Possible example using <ma-set-point-value with a button & validation function?

    Scheduled Pinned Locked Moved Dashboard Designer & Custom AngularJS Pages
    5 Posts 2 Posters 1.5k Views 2 Watching
    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 Offline
      Phillip Weeks
      last edited by Phillip Weeks

      Might please and thank-you someone furnish an example or direct to an example that uses a button to increment an integer point value while incorporating a validation function before setting the point?? The integer point should be the returned point from a watchlist filter.

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

        @Phillip-Weeks I'm not sure what you mean by validation function here. Can you elaborate further?

        Developer at Radix IoT

        1 Reply Last reply Reply Quote 0
        • P Offline
          Phillip Weeks
          last edited by Phillip Weeks

          Jared, my understanding of the variable environment is my biggest hurdle. and learning how to manipulate points from filtered watchlists as variables.. for example <ma-calc takes as input="designer.points | filter:... and produces a new output="mypointvar". This variable is created and set to the result of the input expression correct? I can then use this variable in other directives so how do we assign "designer.points | filter:{name:'COIL PUMP SPEED (P-10)'}:true | maFirst" to a variable like <ma-point-value takes the xid="DP_231293" and creates a point="myvariable" that can be used in other directives. Is there a directive that takes the filtered point and exposes this point as a variable like <ma-calc uses output="myvariable" except is the same reference as the input being the "designer.points" filtered point?
          As well and I'm sure related to my misunderstanding please see if the below makes sense.

          I want a number input to initialize its input value as ng-init="setpoint=50" which works but instead setting the intitial value using a point's value.
          ng-init="setpoint=Point1Value.value" can't get this to work.

          Please demonstrate how to initialize an input to the point value.

           <ma-calc input="designer.points | filter:{name:'COIL PUMP SPEED (P-10)'}:true | maFirst" output="mycoilspeed" on-change="Point1Value = $value;" ng-init="counter=0;" >   </ma-calc>  
          <md-input-container id="input1" flex="10" style="width: 140px; height: 100px; top: 0px; left: 0px; position: absolute;">
              <input id="input2" style="width: 125px; height: 60px; top: 28px; left: 11.091px; position: absolute;" type="number" step="1" min="45" max="55" ng-model="setpoint" ng-init="setpoint=Point1Value.value;">
          </md-input-container>
          
          Jared WiltshireJ 1 Reply Last reply Reply Quote 0
          • Jared WiltshireJ Offline
            Jared Wiltshire @Phillip Weeks
            last edited by

            @phillip-weeks said in Possible example using <ma-set-point-value with a button & validation function?:

            <ma-calc takes as input="designer.points | filter:... and produces a new output="mypointvar". This variable is created and set to the result of the input expression correct?

            Correct.

            @phillip-weeks said in Possible example using <ma-set-point-value with a button & validation function?:

            so how do we assign "designer.points | filter:{name:'COIL PUMP SPEED (P-10)'}:true | maFirst" to a variable

            Using <ma-calc> as you described.

            @phillip-weeks said in Possible example using <ma-set-point-value with a button & validation function?:

            like <ma-point-value takes the xid="DP_231293" and creates a point="myvariable" that can be used in other directives

            <ma-point-value> does not behave like this. It does not output anything, it only has inputs.

            @phillip-weeks said in Possible example using <ma-set-point-value with a button & validation function?:

            Is there a directive that takes the filtered point and exposes this point as a variable like <ma-calc uses output="myvariable" except is the same reference as the input being the "designer.points" filtered point?

            I'm not following this but I believe you just want <ma-calc>.

            @phillip-weeks said in Possible example using <ma-set-point-value with a button & validation function?:

            I want a number input to initialize its input value as ng-init="setpoint=50" which works but instead setting the intitial value using a point's value.
            ng-init="setpoint=Point1Value.value" can't get this to work.

            You have to understand how ng-init works, it is for initialization only so it is only evaluated once. The point value is not ready at the point in time when the expression is evaluated so the expression returns undefined. To make it work use something like ng-if="point.value != null" ng-init="variable=point.value".

            Developer at Radix IoT

            1 Reply Last reply Reply Quote 0
            • P Offline
              Phillip Weeks
              last edited by

              Thanks, Jared I am beginning to figure it out. Thank goodness. :)

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