Jump to content

Data Tag that shows "ID-Prefix+ID Label"


Recommended Posts

Hello Forum,

I'm trying to create a Data Tag that displays the ID Prefix + ID Label of a Door or Window. I’d like to make it universal, so it works for both Doors and Windows using the same tag style.

I'm not sure how to set this up properly — does anyone have any ideas or experience with this?
Any alternative method to achieve the same result would also be appreciated.

Thanks in advance!

image.thumb.png.9d9ac59c777206b2d62d5051f12849fc.png

Link to comment

Something like the below should work. Put it in the Advanced Calculated Field Window.  If you need other fields, inside the #WS_ # blocks you must use pure Worksheet format. You can't use the Data Tag # # format inside the WS block.

 

You need the IFs so you can specify to display nothing if the object is not that object type. Make sure that the entire string is one line (automatic wrapping is ok). If you enter a return between the two parts, then you will get a blank line above the tag for Windows.

 

#WS_IF(OBJECTTYPENAME='Door', CONCAT(Door.IDPrefix, Door.IDLabel, Door.IDSuffix), '')##WS_IF(OBJECTTYPENAME='Window', CONCAT(Window.IDPrefix, Window.IDLabel, Window.IDSuffix), '')#

 

  • Like 2
Link to comment
15 hours ago, Pat Stanford said:

Something like the below should work. Put it in the Advanced Calculated Field Window.  If you need other fields, inside the #WS_ # blocks you must use pure Worksheet format. You can't use the Data Tag # # format inside the WS block.

 

You need the IFs so you can specify to display nothing if the object is not that object type. Make sure that the entire string is one line (automatic wrapping is ok). If you enter a return between the two parts, then you will get a blank line above the tag for Windows.

 

#WS_IF(OBJECTTYPENAME='Door', CONCAT(Door.IDPrefix, Door.IDLabel, Door.IDSuffix), '')##WS_IF(OBJECTTYPENAME='Window', CONCAT(Window.IDPrefix, Window.IDLabel, Window.IDSuffix), '')#

 

 

@Pat Stanford is it possible to use this formula + also link the Door/Window ID Suffixes to their data sources...?

 

I have a Door ID tag that looks like this: #Door#.#IDPrefix##Door#.#IDLabel#->#Door#.#IDLabel##Door#.#IDSuffix#

 

And a Window ID tag that looks like this: #Window#.#IDPrefix##Window#.#IDLabel#->#Window#.#IDLabel##Window#.#IDSuffix#

 

Am wondering if I can combine them into a single tag. I couldn't see a way in either the Advanced Calculated Field + Formula panes...

 

Thanks

  • Like 1
Link to comment

Try this. Instead of using the WS_IF, I used the Trinary Operator with a blank "OR" section.

 

I don't know how to test if the link is working properly as I don't use that functionality.

 

#Door#.#IDPrefix##Door#.#IDLabel#->#Door#.#IDLabel##Door#.#IDSuffix#@#Door#.#IDLabel#<>'':  #Window#.#IDPrefix##Window#.#IDLabel#->#Window#.#IDLabel##Window#.#IDSuffix#@#Window#.#IDLabel#<>'':

Again, the entire formula should be on one line (other than automatic wrapping).

  • Like 1
Link to comment
1 hour ago, Pat Stanford said:

Try this. Instead of using the WS_IF, I used the Trinary Operator with a blank "OR" section.

 

I don't know how to test if the link is working properly as I don't use that functionality.

 

#Door#.#IDPrefix##Door#.#IDLabel#->#Door#.#IDLabel##Door#.#IDSuffix#@#Door#.#IDLabel#<>'':  #Window#.#IDPrefix##Window#.#IDLabel#->#Window#.#IDLabel##Window#.#IDSuffix#@#Window#.#IDLabel#<>'':

Again, the entire formula should be on one line (other than automatic wrapping).

 

Thanks Pat this doesn't work unfortunately because the Tag thinks it's looking for an object which is a Door + a Window at the same time:

Screenshot2025-06-05at19_00_45.png.e4bd633526338ab62fb2d2f4ba17e24a.png

 

I notice the formulas I gave you earlier were wrong so this is what I am using:

#Door#.#IDPrefix##Door#.#IDLabel#->#Door#.#IDLabel#@#Door#.#IDLabel#<>'':  #Window#.#IDPrefix##Window#.#IDLabel#->#Window#.#IDLabel#@#Window#.#IDLabel#<>'':

 

I don't fully understand why your first Tag - using #WS_# - is happy looking for Doors or Windows whereas the second one isn't...?

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...