maWatchListGet not returning .value
-
Hi @bullitbd
What is displayed on your dashboard. I copied your code and changed the watchlist xid and it worked for me.
Does your watchlist have parameters that need to be set?
I don't think it is advisable to put the<ma-get-point-value>
in a<td>
Also, if you want to format the JSON use<pre ng-bind="designer. points | json"></pre>
edit. Jared: There is no reason you cannot put the <ma-get-point-value> in a td.
-
@bullitbd Your observations are 100% in the with the design of the components. Fetching data points will not automatically get their point values. That is what the
<ma-get-point-value>
component is there for.I would suggest just sticking a
<ma-get-point-value points="designer.points">
on your page somewhere. -
Thanks @Jared-Wiltshire. Just to be clear, by design the get-point-value then modifies the designer.points object on which it is called... so that, when passed via scope, designer.points includes the lastPayload object...
Cool. Curious why values are not included in the designer.points object in the first place?
Also, I'm a bit confused - in:
<ma-watch-list-get ng-model="designer.watchList" parameters="designer.parameters" on-points-change="designer.points = $points" id="53368ae5-7ad5-40f7-b3e8-96dd61236a48" watch-list-xid="WL_test"></ma-watch-list-get>
does on-points-change essentially update the model? perhaps the directive code would help my curiosity.
Thanks for your patience and clear responses.
-
Thanks, @CraigWeb. Appreciate the quick response. Pilot error there. But could you enlighten me on what parameters one might set on a watchlist?
-
@bullitbd All the code is opened sourced @ https://github.com/infiniteautomation/ma-dashboards/tree/main/UI/web-src/ngMango
Parameters can be added to watchlists to filter the data points, if the watchlist is not a static watchlist. ie: filter by data source or tags.
-
Thanks - super.
-
@bullitbd said in maWatchListGet not returning .value:
Thanks @Jared-Wiltshire. Just to be clear, by design the get-point-value then modifies the designer.points object on which it is called... so that, when passed via scope, designer.points includes the lastPayload object...
Correct, and crucially the
value
property.@bullitbd said in maWatchListGet not returning .value:
Cool. Curious why values are not included in the designer.points object in the first place?
Because it incurs additional overhead and is not always required.
@bullitbd said in maWatchListGet not returning .value:
does on-points-change essentially update the model?
It does indeed.
@bullitbd said in maWatchListGet not returning .value:
perhaps the directive code would help my curiosity.
Specific link - https://github.com/infiniteautomation/ma-dashboards/blob/main/UI/web-src/ngMango/directives/watchListGet.js
-
Thank you. The work you've done there is nothing short of amazing.
-
This post is deleted! -
This post is deleted!