Opening image based on datapoint value under watch list
-
Hello
I have a filtered watchlist select which contains data from 2 IP addresses that are inside the same device in the field: <ma-watch-list-select id="a9c722c9-aac1-492a-b026-799c6922ab1f" style="position: absolute; left: 0px; top: 203.97px; width: 206.996px; height: 58.9915px;" ng-model="designer.watchList" parameters="designer.parameters" query="{name:'X1_'}"></ma-watch-list-select>
Based on the watch list selected above I display various parameters, amongst others a serial number: <ma-point-value id="3883ca56-bae3-465d-99ee-7a21c90fec6c" style="position: absolute; left: 283.999px; top: 0px; font-size: 32px;" enable-popup="hide" point="designer.points | filter:{name:'Camera_name'}:true | maFirst" label="Serial"></ma-point-value>
Now I want to display an image in a particular folder (where 50 need to be replaced by the point value above):
<img id="20775be3-db0d-4080-a358-713e89d5dcff" style="position: absolute; left: 213.8px; top: 50px; width: 600px; height: 450px; display: flex;" ng-src="/50/lastimage.jpg">I understand that I can use {{myPoint}}, but I cannot find a way to get the particular point from the watch list and bind it to a variable?
I have looked at ma-get-point-value, but the help file says: "This directive pulls the live value of a data point and outputs it onto the point object", however the help is unclear what the SOURCE and what the SINK(DESTINATION) objects are.
The designer creates this:
<ma-get-point-value id="3152e3f9-be26-4e9d-9357-312f474a7018" style="position: absolute; left: 84px; top: 342px;" point="designer.points | filter:{name:'Camera_name'}:true | maFirst"></ma-get-point-value>
but how do I define what this point value should then be assigned to in order to use it elsewhere {{ }}I appreciate your help. Do you have somewhere a list of all the parameters for each of your "ma-" objects? The help files dont seem to list all. I find some assignments in the dashboard designer that are not in the help.
-
@glamprecht said in Opening image based on datapoint value under watch list:
I understand that I can use {{myPoint}}, but I cannot find a way to get the particular point from the watch list and bind it to a variable?
This expression will get a single point from the watch list by name -
designer.points | filter:{name:'Camera_name'}:true | maFirst
, so to use its value you can do(designer.points | filter:{name:'Camera_name'}:true | maFirst).value)
@glamprecht said in Opening image based on datapoint value under watch list:
however the help is unclear what the SOURCE and what the SINK(DESTINATION) objects are.
There's not really a "source" or "sink", it takes a data point and adds a value property to it. Alternatively it also takes a
point-xid="my-xid"
parameter and outputs a point (and value property) using thepoint="myPoint"
attribute.@glamprecht said in Opening image based on datapoint value under watch list:
Do you have somewhere a list of all the parameters for each of your "ma-" objects? The help files dont seem to list all. I find some assignments in the dashboard designer that are not in the help.
You are correct, the help files are not comprehensive unfortunately. The dashboard designer will always list every component and attributes as it reads it from the code itself.
-
@jared-wiltshire said in Opening image based on datapoint value under watch list:
I can now see how to get the point value. Likewise I can get the dataSourceXid like this:
(designer.points | filter:{name:'Camera_name'}:true | maFirst).dataSourceXid)Instead of using the value as in the past, I would now like to get the last digits of the IP address of the dataSourceXid (being an SNMP datasource)
I can see how to access the datapoint through designer.points ,but I cannot figure out how to access the datasource and its address?
-
@glamprecht said in Opening image based on datapoint value under watch list:
I can now see how to get the point value. Likewise I can get the dataSourceXid like this:
(designer.points | filter:{name:'Camera_name'}:true | maFirst).dataSourceXid)Instead of using the value as in the past, I would now like to get the last digits of the IP address of the dataSourceXid (being an SNMP datasource)
I can see how to access the datapoint through designer.points ,but I cannot figure out how to access the datasource and its address?
You would have to retrieve the data source by its XID for each data point, there's not an easy way of doing this. I would recommend using the bulk data point editor to set a tag on each of your datapoints and use this tag instead.