0

Splitting up tags into sections

I would like to split tags up into different sections that will depend on the system. These systems are ending up in the same dataset right now and will stay like this for the forseeable future. 

Currently:

Tag 1

Tag 2 

Tag 3

Tag 4

 

Want:

System A: 

Tag 1

Tag 2

System B:

Tag 3

Tag 4

3 replies

null
    • Helping you release your data rockstar!
    • Jeff_Knepper
    • 2 yrs ago
    • Reported - view

    Sounds like you would like to build a Virtual View of those tags with a new piece of structure added. Virtual Views allow you to abstract the historian and present a new browse structure to your clients. Is there anything within the tag name itself that helps identify whether it goes in System A or System B?

    • srae
    • 2 yrs ago
    • Reported - view

    It could be added to the tag name itself, for instance system A might have a A_TagName1 or B_TagName1, etc. Would this be enough to separate the two? Could it also be as simple as A_TagName1 and TagName2 so if it doesn't have a "A_" at the beginning it gets put into "Section B"? How do I actually create this virtual view?

    • Helping you release your data rockstar!
    • Jeff_Knepper
    • 2 yrs ago
    • Reported - view

    I would recommend reading this article first, it will focus on the concept of Virtual Views and establish the base of knowledge needed prior to creating your first View. I cannot stress enough, this is paramount to understanding how Virtual Views work and the structure you need to add to your tag names in creating a successful View.

    https://helpcenter.canarylabs.com/t/35hfzda/virtual-views-and-asset-models-primer-version-21

    Once you have read and understand the article above, this will walk you through how to use RegEx to create your Virtual View:

    https://helpcenter.canarylabs.com/t/q6hfzwx/creating-a-virtual-view-or-asset-model-version-21

    For your use case you simply want to add prepend your tag names and separate the system identifier from the tag name with a '.'

    'Tag1' becomes 'SystemA.Tag1' and 'Tag3' becomes 'SystemB.Tag3'

    The key will be in using RegEx to capture only the tags that you wish to prepend with either SystemA or SystemB. To do this effectively, you will need some type of logic pattern you can match on. If absolutely no logic exists in the tag name that would allow you to create RegEx rules we can work to create tag properties that would identify the system each tag should be grouped within and help you insert those properties from a SQL table.

Content aside

print this pagePrint this page
  • 2 yrs agoLast active
  • 3Replies
  • 80Views
  • 2 Following