aheininen Posted April 12, 2022 Share Posted April 12, 2022 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? Quote Link to comment
Vectorworks, Inc Employee Nikolay Zhelyazkov Posted April 12, 2022 Vectorworks, Inc Employee Share Posted April 12, 2022 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 2 Quote Link to comment
aheininen Posted April 12, 2022 Author Share Posted April 12, 2022 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)# 1 Quote Link to comment
Recommended Posts
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.