Dropdown selection for datapoint values
-
Hi all
i try to build a dropdown section of one datapoint, which has many different "serial Numbers". Those serial numbers will reflect as the page rollup.any good ideas how to do?
-
<ma-point-values point-xid="point.xid" values="serials" latest="100"></ma-point-values> <md-select ng-model="serialID"> <md-option ng-repeat="serial in serials" ng-value="serial.value">{{serial.value}}</md-option> </md-select> Chosen Serial: {{serialID}}
If you learn how javascript objects work then you'll be able to map out these variables yourself far more easily. Also I suggest you read some more about AngularJS to better familiarise yourself with it's behaviour if you're wanting custom views.
Fox
-
@mattfox
Thank you for the reply, i'm doing learning by doing :)However the output looks like the picture, was hoping to have below off each other and also selectable.
Sorry i'm not an expert in it, that why need some help here and there.
Thank you for the support!
-
Apologies Ronny I need to take my own medicine here!
I've misstyped the md-options, it should be md-option!
Secondly the chosenSerial needs two {} around it, not {[ }}!
I'll amend the markup above for youFox
-
Hi mattfox
yes thats works, but looks like the listing is updating real time, is there a ng-option to false the real time?
-
This post is deleted! -
<ma-point-values point-xid="DP_7e9b56ef-578c-4a0a-96bc-289a29ccc37b" values="serials" latest="100"></ma-point-values> <md-select ng-model="serialID"> <md-option ng-repeat="serial in serials" ng-value={{serial.value}} ng-realtime="false">{{serial.value}}</md-option> </md-select> Chosen Serial: {{serialID}} <br> Start Time: {{serialID.minimum.timestamp | maMoment:'format':'lll'}} <br> Finished Time: {{serialID.maximum.timestamp | maMoment:'format':'lll'}}
unfortunately is updating in real and after a short time the all values wold be the latest value (same values).
also the from- to timestamp would be important for all other values to follow as a page rollupthank you for help and support
-
<md-select ng-model="serialID" ng-required="true" ng-change="callOnChange()" > <md-option ng-repeat="serial in serials" ng-value="{{serial.value}}" > {{serial.value}} </md-option> </md-select> <ma-point-statistics point-xid="DP_7e9b56ef-578c-4a0a-96bc-289a29ccc37b" from='serialID' to='(serialID+1)' statistics="Ring"></ma-point-statistics>
if i would like to use the SerialID with a MA-point-statistics as a from- to, how i could include those values?
Sorry, really trying since days and have no conclusion yet.Thank you for giving me some help!!!
-
Whoa slow down!
Ok so first we have your latest batch of serials. You can set realtime="false" in the ma-point-values so that it doesn't update via the web socket.
Secondly, now you want to use the serials as a means of timestamp?
Looks like more information is required.
Use to and from with dates to make that happen. I'll look when I'm near a pc what you can use to tie it to the dateBar. However I will need more info from you first as to what you intend the "big picture" to be since the list here appears to be growing.Fox
-
@mattfox
Hi Mattfox
what i'm trying to do is a production report based on serial numbers. for this we have the selection of the serial number. After selection of the serial number, there is a start and end time for each serial number, which i would like to use for every datapoint at this page.<md-select ng-model="serialID" ng-required="true" ng-change="callOnChange()" > <md-option ng-repeat="serial in serials" ng-value="{{serial.value}}" > {{serial.value}} </md-option> </md-select> <ma-point-values point-xid="DP_bf4e8b98-ff25-439c-a63e-4af21bc92902" point="point1" values="point1Values" from="serialID.first.timestamp" to="serialID.last.timestamp" > </ma-point-values>
-
First up, what does serialID look like in the dashboard by itself
just enter the{{serialID}}
into the dashboard markup and show me what the actual value looks like. -
-
-
Ok, for a start, that's just a single number. It's not a javascript object so you can't use that dotted object notation.
Let's look at the raw data coming from the serials values, if it's anything like this:
[ {timestamp:1539247293,value:3}]
the approach will have to be changed.Fox
-
Yep, I think you need to look at changing your format. You need the timestamps as your values.
You also need to establish what your start and end times are per each serial. The timestamp by itself won't be enough unless you know you can comfortably add an additional hour for theto
attribute or subtract for thefrom
attribute...Fox
-
the timestamp would be from Serial number to Serial Number+1
-
Then what do you do when you use the latest serial number? Go from that timestamp to now?
-
@mattfox
yes you're correct -
@ronnyhinkel said in Dropdown selection for datapoint values:
ng-change="callOnChange()"
ng-change="callOnChange()"
Are you writing your own controller? -
@mattfox
no thats just a left over from trying, sorry about that