Get tagname as a string from partial tag assignment in popup

I'm using equipment (not that it really matters) and citect 8.0.

I have a single function that opens my popups (can you format code on this forum?):

```

INT
FUNCTION
DspEquipPopup(STRING sEquipName)
  STRING sEquipType
  STRING sPopupWindow

  sEquipType = EquipGetProperty(sEquipName, "Type")

  SELECT CASE sEquipType
    CASE "Unit"
      sPopupWindow = "!Unit"
    CASE "AnalogueInput"
      sPopupWindow = "!AnalogueInput"
  END SELECT

  IF sPopupWindow = "" THEN
    Message("Display Popup", "Could not find a popup window to display for equipment.", 48)
    RETURN -1
  END

  Ass(-2, "Equip", sEquipName, 0) // THIS IS REALLY THE ONLY PART OF INTEREST
  DspPopupCursor(sPopupWindow, 2 + 4 + 8 + 64 + 256 + 512 + 1024)
  WinTitle(sEquipName)
END

```

In my components, I would the use something like `?Equip?_STS` to read the tags for that device/equipment.

What I want to know though, is how can I get that tag name as a string? E.g. if the sEquipName passed in is "SE_AV_01" then I need to produce the string: "SE_AV_01_STS".

I've tried many different things:

AssGetProperty(?Equip?_STS, "TagName")

?STRING Equip? + "_STS"

and other (dumber) variants. I'm out of ideas...

Parents Reply Children
No Data