Anyone know how two watchlists might update from one parameter input ??
-
Is there a way 2 watchlists on one dashboard can update on one parameter input ??
<ma-watch-list-get ng-model="designer1.watchList" parameters="designer1.parameters" on-points-change="designer1.points = $points" id="ThermostatWL1" watch-list-xid="WL_AIRTEMPS" style="top: -17px; left: -12px;"></ma-watch-list-get> <ma-watch-list-get ng-model="designer2.watchList" parameters="designer2.parameters" on-points-change="designer2.points = $points" id="ThermostatWL2" watch-list-xid="WL_HVAC" style="top: -17px; left: -12px;"></ma-watch-list-get>
Combining these into one...
<ma-watch-list-parameters id="2e058c32-2b6b-4bfb-909c-c98fbeb0ddd7" ng-model="designer1.parameters" watch-list="designer1.watchList" style="position: absolute; left: 420.087px; top: 91.9965px; color: rgb(255, 0, 0); width: 480px; height: 58px;"></ma-watch-list-parameters> <ma-watch-list-parameters id="2e058c32-6b6b-4bfb-909c-c98fbeb0ddd7" ng-model="designer2.parameters" watch-list="designer2.watchList" style="position: absolute; left: 420.087px; top: 0px; color: rgb(255, 0, 0); width: 480px; height: 58px;"></ma-watch-list-parameters>
-
Not really
<ma-watch-list-parameters>
is designed for a single watchlist. But if they have the exact same parameters you could make it work.e.g.
<ma-watch-list-parameters ng-model="designer2.parameters" ng-change="designer1.parameters = designer2.parameters" watch-list="designer2.watchList"></ma-watch-list-parameters>
You could also insert your own custom inputs to vary the parameters.
-
Jared This works great and the first watchlist parameter dropdown assigns to the second watch list parameter and the third as well by making sure the parameters were all the same. It works great. Thank-you much.
Further to your related suggestion that we can insert custom inputs to vary the parameter. Can you provide an example of this as well, Please and thank-you.
I would like to init all dropdowns with a specific selection created from the user.username. -
Mango!!!
-
@Phillip-Weeks you can bind any input control to a watch list parameter via Angular's
ng-model
. This works with plain old input fields or any of our components for selecting a data source etc. You just need to make sure that you match the input type to the parameter type. E.g. a point hierarchy parameter on a watchlist expects a point hierarchy folder, a device name parameter expects a string.<input ng-model="designer.parameters.myParameterName">
To initialize it to a certain value add a
ng-init
<input ng-model="designer.parameters.myParameterName" ng-init="designer.parameters.myParameterName = User.current.username">
-
Jared I'll try this out now. paying attention to your examples as I just need some coding samples to get me running, I love the new UI and I'm excited at the prospect of tailoring our applications to the user with some light and relatively straight forward angular coding. Appreciate the help and anywhere you can steer me for more examples integrating angular like above. Thank-you for your help !!
-
No worries. Glad Mango is proving to be effective for you.