@bhanner said in Point Value Link Trigged by button or page change:
@jared-wiltshire
Hi jared,
The code you gave me did work but it set the value of the first tag to 0 regardless of what the value of the second tag was
<ma-get-point-value point-xid="Visitor-Number-Selected" point="Vist_Num"></ma-get-point-value>
<ma-get-point-value point-xid="Visitor-Number-Selected-Script" point="Script"></ma-get-point-value>
<ma-button id="New-Vist" style="position: absolute; left: 1217.99px; top: 1002.03px; z-index: 4;" raised="true" label="New Visitor" ng-click="Vist_Num.setValue('Script'); $state.go('scada.vistorSetupPage')"></ma-button>
Can you see what i'm doing wrong?i'm a bit stumped if it won't work i have a way to make it work using scripts but i'd rather not use that
What I gave was an example which you would need to modify. Given the two points which you have included above I can make it more specific. Try this.
<ma-get-point-value point-xid="Visitor-Number-Selected" point="Vist_Num"></ma-get-point-value>
<ma-get-point-value point-xid="Visitor-Number-Selected-Script" point="Script"></ma-get-point-value>
<ma-button id="New-Vist" style="position: absolute; left: 1217.99px; top: 1002.03px; z-index: 4;" raised="true" label="New Visitor" ng-click="Vist_Num.setValue(Script.value); $state.go('scada.vistorSetupPage')"></ma-button>
You were setting the point to the string value 'Script'. I have modified it to set it to the point value. Note there are no single quotes and we access the point value using .value