Jump to content

Data Tag from record field, shorten record data


Recommended Posts

Hi

 

I would like to use data on Data Tag from custom record which is on format YYYY-XXXXXX-ZZZZ. On Data Tag I would like to show only XXXXXX-ZZZZ. String YYYY- to remove is known length, all ways same amount of characters and same delimiter (-) exists.

 

Is this possible somehow?

Link to comment
  • Vectorworks, Inc Employee

Hello @aheininen,

 

You can do this in VW 2022 using the worksheet functions in the data tag. For the specific case that you mention this should get the job done - #WS_RIGHT('<Record>.'<Field>'; 11)#

 

P.S. Depending on your locale settings you might have to use , instead of ; for the separator.

 

Best Regards,

Nikolay Zhelyazkov

  • Like 2
Link to comment

Thank you @Nikolay Zhelyazkov you pushed me to right direction.

 

I ended up to use WS_MID and define known characters from start as index and gave enough characters to cover rest of characters in record field. This because either XXXXXX or ZZZZ character are not defined by set amount of characters. Twenty should be enough...

 

End result as Tag Field Definition is #WS_MID('<Record>.'<Field>'; 5; 20)#

  • 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...