Anna Perry created great example that contains multiple items and update button. This example can write values by PI Web API.
You can refer it to create your custom symbol.
do you think that it possible to do that with seperate symbols on the display. i do not want to to create on gib symbol.
3 of 3 people found this helpful
You can add additional datasources to a trend programmatically but it's a bit hacky (not documented/supported).
Disclaimer: this may not be the most efficient way to do this but it's the only way I've been able to get this behavior.
First, you will need to get the symbol name:
For a dev/test environment - you can assume that the first symbol added is Symbol0, the second is Symbol1, etc.
Second, inject $rootScope into your custom symbol and add it as a parameter to your init function.
Finally, you can add datasources to your symbol by using the following:
var s = $rootScope.getSymbolByName('Symbol0'); s.DataSources.push('pi:\\\\servername\\tagname'); //for pi points s.DataSources.push('af:\\\\path\\to\\element|attribute'); //for attributes