forbidden14 Posted November 30, 2021 Share Posted November 30, 2021 Hey all, I know I'm pretty close, but think I'm missing a step, was wondering if there is an easy way to replace spaces with hypens at the attribute level in tops? Or assembling a split string with hyphens in between? I have the string split into an array (@split) and the split count in an integer attribute(@splitcount). Thanks in advance Quote Link to comment Share on other sites More sharing options...
mestela Posted November 30, 2021 Share Posted November 30, 2021 I don't think there's a clean way in tops nodes, but its easy enough with a python script top: # get attrib = work_item.stringAttribValue('myattrib') # split attrib = attrib.split(' ') # rejoin with underscores attrib = '_'.join(attrib) # set work_item.setStringAttrib('myattrib', attrib) 1 Quote Link to comment Share on other sites More sharing options...
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.