About magetpointvalue array's question
-
<div class="" ng-init="values = [];select = []"> <label ng-repeat="classID in classArray track by $index" class="col-2 px-4"> <input class="check-btn" type="checkbox" ng-model="ems.EMSObjectID.ctrler[$index]" value="classID" ng-true-value="{{ classID }}" ng-click="values.push(class_kwh[$index].renderedValue)"> <span> {{classID}} </span> </label> </div> <div ng-repeat="vla in class_kwh"> {{ vla[ 'renderedValue' + point.xid ] }} </div> <ma-point-query query="{name:'channel-kwh'}" points="class_kwh" promise="promise"></ma-point-query> <ma-get-point-value points="class_kwh"></ma-get-point-value>
I got
class_kwh
array withma-get-point-vlaue
and I can use repeat to show value by<div ng-repeat="vla in class_kwh"> {{ vla[ 'renderedValue' + point.xid ] }} </div>
how do I use<input class="check-btn" type="checkbox" ng-model="ems.EMSObjectID.ctrler[$index]" value="classID" ng-true-value="{{ classID }}" ng-click="values.push(class_kwh[$index].renderedValue)">
this
$index
to getclass_kwh[$index]
and to show[ 'renderedValue' + point.xid ]
I want to use checkbox get index and push this $idex's class_kwh array value to values -
@sean for rendered values use
['rendered_' + xid]
If you are using ma-point-values,
For what you are doing it may be better to use ma-point-value and set the display type to rendered.Fox
-
But in
<ma-point-query query="{name:'channel-kwh'}" points="class_kwh" promise="promise"></ma-point-query> <ma-get-point-value points="class_kwh"></ma-get-point-value>
I can use
{{ class_kwh[0] }}
to show this index array obj detail but I don't how to show value or rendered value
{{ class_kwh[0].value }} or {{ class_kwh[0].renderedValue }}
both not work -
What does
{{ class_kwh[0] }}
Actually show you?
-
{{ class_kwh[0] }}
Is show this array[0] information
{"id":2721,"xid":"EMS_004065_001_H1_kWh","name":"kWh-001.班級冷氣-(1小時率)-用電度數(kWh)","enabled":true,"deviceName":"(1小時率)-統計","readPermission":"superadmin,admin,user","setPermission":"superadmin,user","pointFolderId":0,"purgeOverride":false,"unit":"","useIntegralUnit":false,"useRenderedUnit":false,"pointLocator":{"contextUpdate":false,"modelType":"PL.SCRIPTING","settable":true,"dataType":"NUMERIC","varName":"h1_kWh_001","relinquishable":false},"chartColour":"","plotType":"SPLINE","loggingProperties":{"loggingType":"ALL","tolerance":0,"discardExtremeValues":false,"overrideIntervalLoggingSamples":false,"cacheSize":1},"textRenderer":{"useUnitAsSuffix":true,"format":"0.00","suffix":"","type":"textRendererAnalog"},"chartRenderer":{"timePeriod":{"periods":1,"type":"DAYS"},"type":"chartRendererImage"},"rollup":"NONE","simplifyType":"NONE","simplifyTolerance":"NaN","simplifyTarget":5000,"preventSetExtremeValues":false,"templateXid":null,"dataSourceId":88,"dataSourceXid":"EMS_004065_H1_Stats","dataSourceName":"@EMS統計-2.[1小時率]","dataSourceTypeName":"SCRIPTING","dataSourceEditRoles":[],"tags":{},"originalId":"EMS_004065_001_H1_kWh","lastPayload":{"xid":"EMS_004065_001_H1_kWh","event":"REGISTERED","value":{"dataType":"NUMERIC","value":0,"timestamp":1625454000000,"annotation":null},"renderedValue":"0.00 ","convertedValue":0,"enabled":true,"pointEnabled":true,"attributes":{}},"running":true,"_textRenderer":{},"value":0,"time":1625454000000,"convertedValue":0,"renderedValue":"0.00 ","unreliable":false}
-
Looks like
{{class_kwh[0].value}}
Will work fine to me...
Fox
-
It work thank you
-
Anytime