Trim Characters From the End of a String
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello,
I am trying to trim characters from the end of a string and nothing I'm doing is working. I either get no data in my output or an error.
I'm trying to trim 7 characters from the right hand side of a field. The field name is "Test Name" and just want to trim the dates from the end:
- Example
- Test Name
- This is my test 202308
- This is my test 202307
- This is my test 202306
- Test Name
I want to trim the dates so they're all alike so i can join them to other tables.
I've tried this from a previous community discussion but I'm not getting any results:
- left([Test Name], Length([Test Name]) - 7)
There are a total of 7 characters I'm trying to delete (6 for the date and 1 for the space at the end of the test name.)
Where am I off that I can't get this to work?
Thanks!
- Labels:
- Error Message
- Tips and Tricks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
What kind of error are you getting?
That formula looks correct. I used it on the examples you gave and every field to end up saying "This is my test"
Can you share the workflow? There may be something else going on to cause the issues.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
That should work. Can you share a screenshot of your workflow and the results pane showing the output of your attempted formula?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi, The error says, "The field "" is missing. Compare the tool configuration with the input stream. (Expression #1)"
The data in that field is a vstring.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Usually you get that error if you did not specify a field to output your formula tool to.
Add a new column or choose to update the existing Test Field and that error should go away.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi, Can't share. Office blocks screenshots. Sorry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Brilliant! That did the trick!
In hindsight, total face palm!
Thank you!