Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.
Data Point Value
-
A question about Point Value type,
How to save object type likenewValue = {"Name":"CardName_A02","Rack":"CardNo_A02","Label":"A","idx":2}
into datapoint ?
I use
Point.setValue(newValue)
but in Point's value is null
How do I do to save object type value in datapoint? -
If you wish to save a string, make sure your point is an alphanumeric value. Secondly, ensure your data is a string and not an object.
Thirdly, if this is in a script the method is set() not setValue. The dashboard is setValue()
Fox -
@mattfox I just want save object in value or value can't be object?
Code is this<div ng-init="rackList = [ {'Name': 'CardName_A01', 'Rack': 'CardNo_A01', 'Label': 'A', 'idx': 1}, {'Name': 'CardName_A02', 'Rack': 'CardNo_A02', 'Label': 'A', 'idx': 2}, {'Name': 'CardName_A03', 'Rack':'CardNo_A03', 'Label': 'A', 'idx': 3}, {'Name': 'CardName_A04', 'Rack': 'CardNo_A04', 'Label': 'A', 'idx': 4}, {'Name': 'CardName_A05', 'Rack': 'CardNo_A05', 'Label': 'A', 'idx': 5}, {'Name': 'CardName_A06', 'Rack': 'CardNo_A06', 'Label': 'A', 'idx': 6}, {'Name': 'CardName_A07', 'Rack': 'CardNo_A07', 'Label': 'A', 'idx': 7}, {'Name': 'CardName_A08', 'Rack':'CardNo_A08', 'Label': 'A', 'idx': 8}, {'Name': 'CardName_A09', 'Rack': 'CardNo_A09', 'Label': 'A', 'idx': 9}, {'Name': 'CardName_A10', 'Rack': 'CardNo_A10', 'Label': 'A', 'idx': 10}, {'Name': 'CardName_B01', 'Rack': 'CardNo_B01', 'Label': 'B', 'idx': 1}, {'Name': 'CardName_B02', 'Rack': 'CardNo_B02', 'Label': 'B', 'idx': 2}, {'Name': 'CardName_B03', 'Rack':'CardNo_B03', 'Label': 'B', 'idx': 3}, {'Name': 'CardName_B04', 'Rack': 'CardNo_B04', 'Label': 'B', 'idx': 4}, {'Name': 'CardName_B05', 'Rack': 'CardNo_B05', 'Label': 'B', 'idx': 5}, {'Name': 'CardName_B06', 'Rack': 'CardNo_B06', 'Label': 'B', 'idx': 6}, {'Name': 'CardName_B07', 'Rack': 'CardNo_B07', 'Label': 'B', 'idx': 7}, {'Name': 'CardName_B08', 'Rack':'CardNo_B08', 'Label': 'B', 'idx': 8}, {'Name': 'CardName_B09', 'Rack': 'CardNo_B09', 'Label': 'B', 'idx': 9}, {'Name': 'CardName_B10', 'Rack': 'CardNo_B10', 'Label': 'B', 'idx': 10}, {'Name': 'CardName_C01', 'Rack': 'CardNo_C01', 'Label': 'C', 'idx': 1}, {'Name': 'CardName_C02', 'Rack': 'CardNo_C02', 'Label': 'C', 'idx': 2}, {'Name': 'CardName_C03', 'Rack':'CardNo_C03', 'Label': 'C', 'idx': 3}, {'Name': 'CardName_C04', 'Rack': 'CardNo_C04', 'Label': 'C', 'idx': 4}, {'Name': 'CardName_C05', 'Rack': 'CardNo_C05', 'Label': 'C', 'idx': 5}, {'Name': 'CardName_C06', 'Rack': 'CardNo_C06', 'Label': 'C', 'idx': 6}, {'Name': 'CardName_C07', 'Rack': 'CardNo_C07', 'Label': 'C', 'idx': 7}, {'Name': 'CardName_C08', 'Rack':'CardNo_C08', 'Label': 'C', 'idx': 8}, {'Name': 'CardName_C09', 'Rack': 'CardNo_C09', 'Label': 'C', 'idx': 9}, {'Name': 'CardName_C10', 'Rack': 'CardNo_C10', 'Label': 'C', 'idx': 10}, {'Name': 'CardName_D01', 'Rack': 'CardNo_D01', 'Label': 'D', 'idx': 1}, {'Name': 'CardName_D02', 'Rack': 'CardNo_D02', 'Label': 'D', 'idx': 2}, {'Name': 'CardName_D03', 'Rack':'CardNo_D03', 'Label': 'D', 'idx': 3}, {'Name': 'CardName_D04', 'Rack': 'CardNo_D04', 'Label': 'D', 'idx': 4}, {'Name': 'CardName_D05', 'Rack': 'CardNo_D05', 'Label': 'D', 'idx': 5}, {'Name': 'CardName_D06', 'Rack': 'CardNo_D06', 'Label': 'D', 'idx': 6}, {'Name': 'CardName_D07', 'Rack': 'CardNo_D07', 'Label': 'D', 'idx': 7}, {'Name': 'CardName_D08', 'Rack':'CardNo_D08', 'Label': 'D', 'idx': 8}, {'Name': 'CardName_D09', 'Rack': 'CardNo_D09', 'Label': 'D', 'idx': 9}, {'Name': 'CardName_D10', 'Rack': 'CardNo_D10', 'Label': 'D', 'idx': 10}, {'Name': 'CardName_E01', 'Rack': 'CardNo_E01', 'Label': 'E', 'idx': 1}, {'Name': 'CardName_E02', 'Rack': 'CardNo_E02', 'Label': 'E', 'idx': 2}, {'Name': 'CardName_E03', 'Rack':'CardNo_E03', 'Label': 'E', 'idx': 3}, {'Name': 'CardName_E04', 'Rack': 'CardNo_E04', 'Label': 'E', 'idx': 4} ]"></div> <ma-get-point-value point-xid="XID_cardControllerLastRack" point="LastRackSelect"></ma-get-point-value> <div ng-init="pointName.Rack = LastRackSelect.value"></div> <ma-point-query query="{$and: true,name:pointName.Rack,deviceName: 'RackAccessSystem'}" sort="'name'" points="points"></ma-point-query> <ma-point-query query="{$and: true,name:pointName.Name,deviceName: 'RackAccessSystem'}" sort="'name'" points="names"></ma-point-query> <ma-get-point-value points="points"></ma-get-point-value> <ma-get-point-value points="names"></ma-get-point-value> <form layout-gt-sm="row" name="Form"> <md-input-container flex="" id="cardedit"> <label>select Item</label> <md-select class="select-block" ng-model="pointName" ng-change="LastRackSelect.setValue(pointName)" ng-model-options="{getterSetter:true}"> <md-option ng-repeat="Rack in rackList" ng-value="Rack">{{Rack.Name | limitTo:3:9}}</md-option> </md-select> </md-input-container> </form>
I want to save select
pointName
object to save in datapointXID_cardControllerLastRack
when nexttime into this page can loadXID_cardControllerLastRack
value to use default select ng-model -
No thats not how the system works. If you want to save it, use JSON.stringify(obj) and then save that. That will allow you (mostly) to store the object as a string.
Then you can get the object back using JSON.parse(string)
Fox
-
@sean if what you are trying to do does not need a time series history then I believe the JSON store is better suited for this. The JSON store is there to be used for static data. There is a limit on the size of the string that can be stored as a value.
-
I am with Craig now that I can see what you are trying to do. The rackspaces can be defined in a json store like he says and then pulled with a
<ma-json-store>
Fox