Indirect addressing
-
Hi,
I'm wanting to setup up a dashboard so it displays the values from different data points based on on the value of a different data point.
E.g. if data point X has a value of 1 then the value from data point 1 should be displayed, DPX has a value of 2 then the value from data point 2 should be displayed and so on and so forth.
Thanks in advance
Billy -
@bhanner You should look at the AngularJS directives ng-if, ng-show, and ng-hide.
e.g.
<ma-get-point-value point-xid="source-point-xid" point="sourcePoint"></ma-get-point-value> <ma-point-value ng-show="sourcePoint.value === 1" point-xid="point-one"></ma-point-value> <ma-point-value ng-show="sourcePoint.value === 2" point-xid="point-two"></ma-point-value>
-
Hi Jared,
Thats part of the way there at what i'm after is there a way to edit it so i can change which point-xid is used for the ma point value?
Or insert the value of a varible inside the name of the Point xid refference e.g. Point-xide="point-{1}"
With {1} being the varible
Kind regards
Billy H -
@bhanner You can use a point value inside the
point-xid
attribute<ma-get-point-value point-xid="source-point-xid" point="sourcePoint"></ma-get-point-value> <ma-point-value point-xid="point-{{sourcePoint.value}}"></ma-point-value>