Remove control characters from imported AF tables
- Last UpdatedJan 11, 2023
- 2 minute read
- PI System
- PI Server 2018
- PI Server
After importing or linking data from an external data source, you should inspect AF tables for control characters, such as carriage returns and line feeds prior to executing a query. The presence of control characters can cause an AF table lookup query to fail. Remove control characters from these tables to avoid issues with retrieving query results. See WHERE clause syntax for information on using the WHERE clause to obtain values from a table column in a table lookup data reference.
In AF tables, cells highlighted in yellow indicate the presence of control characters. If the table contains imported data, you can view and remove control characters using the Text Visualizer text box.
Note: Cells that contain control characters in linked tables are also highlighted. You can use the Text Visualizer to view these control characters, but you cannot edit or remove them.
-
In the Library browser, navigate to the imported or linked table.
-
Click the Table tab.
-
On the Table tab, locate cells highlighted in yellow.
-
Place your mouse pointer over the highlighted cell and then click the cell.
A tool tip displays the cell contents and the <*Contains Control Characters*> text.
-
Right-click the highlighted cell, then click Show Selected Cell's Content.
The Text Visualizer text box opens.
-
Click the Show Control Characters check box to display all control characters in the cell.
Note: The Text Visualizer text box is read-only when control characters are displayed. You cannot edit cell contents or delete control characters in an imported table when the Show Control Characters option is selected. You must deselect the Show Control Characters option before you can edit cell contents in an imported table.
-
Click the Show Control Characters check box to deselect the option and hide all control characters.
-
Optional: If you have imported data into an AF table, you can remove all control characters, such as carriage returns (<CR>), spaces (·), and line feeds (<LF>), to ensure only essential characters remain.
-
When all control characters have been deleted, click OK.
The cell is no longer highlighted in yellow after control characters have been removed.
-
Repeat steps 3-9 to continue viewing and removing control characters in an imported table.
-
To save your work, right-click the table in the Library browser and select Check In.