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.
Adding condition checks to ma-set-point-value
-
Heya,
This question is in 2 parts:
Is there a way to display a response to the user that the value they entered has exceeded the bounds specified in the data point?
I created a virtual point "Angle X Setpoint" and set the high and low limit to be 5 and 0 (and checked Prevent extreme sets). When a user enters a value into the field and clicks set, the operation appears to succeed as the button shows the check mark and there is no error. However, when you examine the data point, the value was not saved.
Does ma-set-point-value have the ability to display an error response or at least show the save was unsuccessful?
Do you have any suggestions if I wanted to add custom condition checks to the ma-set-point-value object? Would I have to create my own component so I could add the condition checks?
Thanks
IanPS: mango v3.5.6
-
Hi Ian,
My first suggestion for 1) involves using a number input with the desired mins and maxes, then a ma-button/md-button to use the
point.setValue( numberFieldVal)<md-input-container> <input type="number" minimum="0" maximum="5" ng-model="angleToSet"/> <md-button ng-click="anglePoint.setValue( angleToSet ) " class="md-primary md-raised">Set Angle Value</md-button> </md-input-container>Do you have any suggestions if I wanted to add custom condition checks to the ma-set-point-value object? Would I have to create my own component so I could add the condition checks?
That would be best. As you know, the components in the UI all use the REST API, so use that to enable you to write your own checks etc.
In fact if you're trying to do the same above, you may as well look at the github and see Jared's approach and work from there. You could then likely set different "setValue" calls so when setting a point value, you can run different checking algorithms and set alerts using an alert or $mdToast or the like.Fox
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login