#41690 - 12/12/12 08:30 AM
Re: Removing (stripping) text from Data Selection
[Re: Wildcard]
|
OL Expert
Registered: 04/19/10
Posts: 316
Loc: London, UK
|
You could do this using the 'strip' function. In your data selection, click "Custom data selection" and type in the box:
=strip('(No Credit)',@(¤t.line, 1, 100))
...where 1 and 100 are the columns between which your data lies on the 'current line'. Hope this helps.
|
Top
|
|
|
|
#41693 - 12/12/12 09:21 AM
Re: Removing (stripping) text from Data Selection
[Re: jim3108]
|
OL Newbie
Registered: 08/30/12
Posts: 25
|
Thanks for the response Jim,
I tried this but I get the following Result.
Result: PTK0039: "current.line" does not seem to be an interger variable.
|
Top
|
|
|
|
#41697 - 12/12/12 09:53 AM
Re: Removing (stripping) text from Data Selection
[Re: Raphael Lalonde Lefebvre]
|
OL Newbie
Registered: 08/30/12
Posts: 25
|
No more errors thankfully but why wont the rest of my data show up? I am not sure what I am missing. No more errors are present, but the data selection is blank. My data selection is from line 15 to line 58, column 43 to 60. The function I have in there is this. =strip('(No Cr', @(¤t.line, 43, 60)) None of my data shows up with this function in place. If I change the ¤t.line to the actual line number it is located on, the function displays that line with the (No Cr stripped from it as intended. But none of the other lines are visable anymore. I tweaked it a little bit to fit my data selection and it has to strip out '(No Cr' instead of (No Credit) I assume that I will be able to create several more functions to strip out other chunks of text as well? Quality (Sales Adj
Quality - A (Retur
Quality - B (Sp.Li
Quality - C (Salva
Quality - D (Short
Quality - E (Color
Mis-picks
Shortages
Sales Error
Customer
Entry Error
Price Adjustment
Miscellaneous
Fuel Surcharge
Pallet Cover
Driver Error
Product Recall
Damaged
FSTC Returns
Quality - N (No Cr
|
Top
|
|
|
|
#41700 - 12/12/12 05:09 PM
Re: Removing (stripping) text from Data Selection
[Re: Wildcard]
|
OL Expert
Registered: 09/06/00
Posts: 1984
Loc: Objectif Lune, Montreal, Qc
|
You can't use ¤t.line on a data selection that contains multiple lines. As soon as you use an advanced expression, that expression operates on a single line. Thankfully, there's an easy way to do this: - Create a data selection that contains only the first item, on line 15
- Make sure you set it to custom data selection and use the strip command: =strip('(No Cr', @(¤t.line, 43, 60))
- Go to the Repeat tab of your data selection object and set the From/To line fields to 15 and 58
Here, the advanced data selection will get "repeated" for each line in the From/To settings, incrementing the ¤t.line value as it goes. That should do the trick.
_________________________
Technical Product Manager I don't want to achieve immortality through my work; I want to achieve immortality through not dying - Woody Allen
|
Top
|
|
|
|
#41713 - 12/13/12 09:35 AM
Re: Removing (stripping) text from Data Selection
[Re: Philippe F.]
|
OL Newbie
Registered: 08/30/12
Posts: 25
|
Thank you Philippe! It is working as intended now. Is there a way to add multiple items to this strip function? I thought I would be able to do something like this to strip out additional selections as well. This is what I tried to do but it does not like this. =strip('(No Cr','(Sales Adj',@(¤t.line, 43, 60)) I tried adding a new function but it displays the data twice with the first column removing the (No Cr and the second removing the (Sales Adj The end result I am looking for is preventing the following items showing up. (Sales Adj (Retur (Sp.Li (Salva (Short (Color (No Cr Sorry again for all the easy questions.
|
Top
|
|
|
|
#41714 - 12/13/12 10:14 AM
Re: Removing (stripping) text from Data Selection
[Re: Wildcard]
|
OL Expert
Registered: 04/19/10
Posts: 316
Loc: London, UK
|
If you are trying to strip an already stripped string, you need two strip functions...
=strip('Ja',(strip('mes','James Stacey')))
This will return "Stacey" which is my surname stripping out my first name, "James".
Edited by jim3108 (12/13/12 10:16 AM)
|
Top
|
|
|
|
#41720 - 12/13/12 01:42 PM
Re: Removing (stripping) text from Data Selection
[Re: jim3108]
|
OL Newbie
Registered: 08/30/12
Posts: 25
|
Thanks Jim! This has given me the desired result I wish to have.
|
Top
|
|
|
|
|
|