SOLVED
Select first part of a string
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
murrayjl03
7 - Meteor
‎09-20-2017
01:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
I have various strings:
TestString1.xls\Test\Documents
Test String 2.xls\Test\Documents
I want to select the first part of the string up to the "\".
Thanks
Solved! Go to Solution.
Labels:
- Labels:
- Dynamic Processing
4 REPLIES 4
Alteryx
‎09-20-2017
01:33 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks for your question!
For this I would use a 'Text to Columns' tool with the \ as the delimiter. This will break your string field into two separate fields. The first output field is your desired result.
Hope this helps!
nick_ceneviva
11 - Bolide
‎09-20-2017
01:35 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You can use the following formula in the formula tool:
SUBSTRING([Field Name],0,FINDSTRING([Field Name],"\"))
Alteryx
‎09-20-2017
01:35 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
16 - Nebula
‎09-20-2017
01:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @murrayjl03! Yet another way to accomplish what you're wanting is to add the following in a Formula tool:
REGEX_Replace([Field1], "(.*?)\\.*", "$1")
