I have a substring transform that works great if the department length is over 28 characters but if it is under that number it errors out. Is there a way to do it so it takes 28 or less
You could use the Right Pad transform to ensure a minimum length, then use your Substring transform, and finally a Replace All or Trim transform to remove the padding.
Alternatively, you can use a Split transform with a Regular Expression to select the first 28 characters as the delimiter.
Personally, I would probably use the Split transform.
I personally try to avoid static transforms with velocity logic whenever possible because they are easy to make mistakes with, hard to debug, and tend to fail in unexpected ways.
For example, in the above transform if the “department” attribute is blank you would expect the end result to be a blank but it actually gives an error and puts your identity into an error state.