The TrendSelPt application is configured to open a screen with a Grid object (text file source) with the Trend Object's Add Pen icon, from which the user selects a record, loading the first column value from the record into the tag configured in the Selected field on the Advanced dialog of the Grid object. The tag's name is loaded into one of the string tag array positions used in the indirect addresses configured on the Points dialog of the Trend object. The particular index used is based on the number of tags already displayed in the legend as indicated by the integer tag configured in the PointNumber field on the Advanced dialog of the Trend Object. The Number of Items field on the Trend Object's Legend dialog is incremented each time the user adds a pen, due to the script on the OK button on the Grid screen. That is selected after the record is highlighted on the grid to load the indirect address string, incrment the NumberOfItems tag, and close the Grid screen.
