How-to
Show mixed-case tag names in a historian tag selector
Short answer
The historian stores one normalized lowercase path per tag in sqlth_te, so a selector that displays that column shows lowercase. Do not re-case the table: keep the stored path as the selection value and join a display label, populated from each tag's Tooltip, from a table your application owns.
On this page
- Why does the tag selector show every path in lowercase?
- Can you force the tag historian to keep the tag path's case?
- What should you check and back up before changing the selector?
- How do you add display labels without editing the historian's tables?
- When is adding label columns to sqlth_te itself acceptable?
- How do you verify the labels still select the right history?
- What keeps the label mapping honest over time?
- Questions asked
The tag selector shows lowercase because the tag historian stores a normalized, lowercase path for every history tag in sqlth_te, and the component is displaying that stored column. Do not re-case the table. Keep the stored path as the selection value and give operators a separate display label, populated from each tag's Tooltip and joined into the selector query from a table your application owns. This guide covers why the path is normalized, what to back up first, the build steps, the sqlth_te-column approach one installation reported, and how to verify the labels still select the right history.
Why does the tag selector show every path in lowercase? #
Because the selector is displaying the path column the historian wrote: enabling history in the History section of the Tag Editor registers the tag in sqlth_te with one normalized, lowercase path, and the query behind the list returns that column.
sqlth_te is the historian's identity record, not a display table. A path that is not present in it, or that is flagged retired, gets no partition allocated and no values inserted — the engine treats it as a tag it has never been asked to store. The tag itself keeps its mixed-case name in the tag browser; only the stored historian path is normalized. When history plots correctly for the expected range and only the label reads wrong, the fault is presentation, and that is where the fix belongs.
| Operator symptom | What it means | Where to work |
|---|---|---|
| Names lowercase, history plots correctly | Presentation only; selection still resolves | Display layer |
| Friendly label plots the wrong signal | Label-to-path mapping fault | Label table or query join |
| History missing, live value updates | Recording or query fault, unrelated to casing | Recording configuration |
| Live value also unavailable | Tag or communication fault | Driver and controller |
When history is missing while the live value still updates, chase that before touching labels; why historian tags stopped recording while live data stayed good walks that path.
Can you force the tag historian to keep the tag path's case? #
No — there is no supported setting that preserves case in the stored path, and re-casing rows in sqlth_te changes tag identity, not the screen label your operators read.
The engine decides partition allocation and inserts by looking the tag up at the path it normalized when it registered the tag. A row whose stored text no longer matches that lookup behaves like an unregistered path: no partition, no inserts. The edit is also the same class of change as a rename, because it separates a path from its history — and if paths have already moved on you, bridging tag history after a tag path change is the repair for that, not a relabeling. Decision: spend the effort on the display layer and leave the stored identity alone.
What should you check and back up before changing the selector? #
Export sqlth_te before any change that touches it — the standing rule for working on a live production historian — and record, for one known tag, its configured name, its Tooltip, its stored path, and the label the selector shows today.
Where the table lives depends on the database. With the default internal database, the historian tables sit in an IDB file at IgnitionInstallationDirectory/data/local/tag-historian and need a SQLite viewer to read; with an external database, query it there. Confirm the exact table name in your connected database before writing any query against it — the documented name is sqlth_te. Capture a working history plot as the baseline before editing the binding, so you judge success on the data returned, not on capitalization. If you are not certain which layer dropped the case, trace a PLC tag from the controller to the historian display first and find where the name changes.
How do you add display labels without editing the historian's tables? #
Build one application-owned table holding the stored path, a display label and a group name; populate it from each tag's Tooltip by script; return label and path together from the selector query, with the label as visible text and the path as the selection value.
- Create the metadata table outside the historian's table set, keyed on the stored path exactly as sqlth_te holds it, with label and group columns.
- Populate it with a script that walks the history-enabled tags, reads each tag's Tooltip, and writes label and group. Re-run it after tag additions, renames and Tooltip edits.
- Write the selector query to return both columns, with a fallback so a tag without a label shows the stored path rather than a blank row.
- Bind the label column to the component's visible text and the path column to the history binding or the system.tag.queryTagHistory call, so retrieval always receives the identity the historian wrote.
- Keep the operator filters — site, group, search text — as predicates in the query, passing operator-entered text through parameterized queries.
- In a tree, build nodes from the group column and hang selectable entries on the leaves; in a list, show label plus group wherever duplicate labels exist.
Worked example, with the arithmetic a mid-size selector produces: 1,400 history tags across 3 areas, and a sync script that finds Tooltips on 1,120 of them. Fallback count = 1,400 − 1,120 = 280 entries displaying stored paths until the Tooltips are filled; print that count every run and it becomes your cleanup backlog. Two of the tags, one in Area 1 and one in Area 3, both carry the Tooltip "Tank 12 Temperature" — both rows stay valid because each holds a different stored path, and the display reads "Tank 12 Temperature — Area 1" and "Tank 12 Temperature — Area 3". The operator picks the augmented label; the history query receives the stored path.
When is adding label columns to sqlth_te itself acceptable? #
It works — one reported installation adds tagname and group name fields to sqlth_te, fills them by script from the history tags' Tooltips, and drives a scripted treeview whose datasource is a query — but it puts presentation data inside a schema the historian maintains.
Operators see names they understand and the stored path is never rewritten, which is the part worth copying. The cost is coupling: your columns now ride in a table the historian owns, so every backup, migration and upgrade has to carry them, and anything the vendor ships against that table can collide with what you added. Decision: acceptable where you own that database and its maintenance for the life of the system; anywhere you will hand the system off, use the application-owned table from the previous section, which gives the same operator result with none of the coupling.
How do you verify the labels still select the right history? #
Verify on one known tag first: select it by its friendly label, select it again by its stored path, and confirm both selections return the same rows over the same time window.
- Pick a tag with history you already trust, plot a fixed range by label, then by stored path, and compare the two plots value for value.
- Select each half of a duplicate-label pair and confirm each entry plots its own area's signal.
- Select a fallback row — a tag with no Tooltip — and confirm it plots.
- Type each operator filter and confirm it narrows on label, stored path or group as designed.
- Re-run the sync and check the counts: labels found, fallbacks remaining.
What keeps the label mapping honest over time? #
Re-run the Tooltip sync after any tag addition or rename, set a trigger for Tooltip edits, and treat identical labels in different groups as a display problem solved with group context — selection always resolves on the stored path.
A Tooltip edited after the sync leaves a stale label until the script runs again, so decide when it executes — on demand, on tag change, on a schedule — and give it error reporting you actually read. New tags stay selectable through the fallback until the sync reaches them. Measure the query and the component separately: a list filtered in SQL refreshes with the query, while a tree pays node construction and rendering on top of it, and a fast query proves nothing about tree rebuild time. Decision: use the list where operators find tags by search text; use the tree where they navigate by group, and accept the render cost.
Questions asked
Does a lowercase entry in the selector mean the PLC tag name changed?
No. The controller tag keeps the name you configured, and the tag browser still shows that casing; only the path stored in sqlth_te is normalized. If the live value updates and history plots for a known range, the tag and its communications are fine and the work belongs in the display layer.
Is it safe to run an UPDATE on sqlth_te to restore capitalization?
Not as a display fix. The engine uses that table to decide partition allocation and inserts, so a row that stops matching the path the historian writes behaves like an unregistered tag. Export the table first, keep the export as your rollback, and solve casing in the label layer instead.
What happens to tags with no Tooltip when the label sync runs?
They fall back to the stored path. Make the sync insert a row for every history tag even when the Tooltip is empty, so the fallback is structural rather than a missing entry, and count the fallback rows each run: 1,400 tags with 1,120 labeled leaves 280 on stored paths, which is your Tooltip cleanup backlog.
Should the selector be a list or a tree?
Use the list when operators find tags by search text, because the filter runs as a SQL predicate and refreshes with the query. Use the tree when operators navigate by group. A query-backed treeview filters the same way, since its datasource is a query too, but it adds node construction and rendering time the list does not pay.
Two areas have tags with the same label. How do operators pick the right one?
Show the group with the label so the entries read differently, and never resolve the selection on the label: each row carries the stored path as its value, so identical labels remain two distinct selections. Renaming one Tooltip later fixes the display without touching history, because the label is not the identity.