- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
subfield extract requirement
Hi, Hoping someone has already done this. I have a product file that contains product description which includes text for KW,
eg "SYNERGY 110KW/180A SOFTSTARTER". I want to create a field during load to extract all values as 'KW", eg "110". The KW rating could be anywhere in the description string. Some combination of index and other text field methods locating "KW" then finding the preceeding space, then getting the text between this and KW. Thanks
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you both this was very helpful. This combined method works:
If there are multiple spaces before KW, eg
"Some other SYNERGY 110KW/180A SOFTSTARTER"
Load
subfield(Textbetween(ProductDesc,' ','KW'),' ',-1) as KW
- returns just 110
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
the following should help:
load textbetween(your_field, ' ', 'KW') as KW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Simon,
Refer to attached using subfield for your requirement.
Thanks and regards,
Arthur Fong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, what if the description was "Some other SYNERGY 110KW/180A SOFTSTARTER",
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you both this was very helpful. This combined method works:
If there are multiple spaces before KW, eg
"Some other SYNERGY 110KW/180A SOFTSTARTER"
Load
subfield(Textbetween(ProductDesc,' ','KW'),' ',-1) as KW
- returns just 110
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you can benefit from other string functions like:
load mid(ProductDesc,index(ProductDesc,' ',-1) + 1,len(ProductDes) - index(productDes,'KW')-1)