Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Experties,
I have a one querey regarding text remove with in the fields.Can anyone please help me out of this .
The column fileds look like below :
--list box --
Type:
Type:
Business v1
Auto Payments v2
Business v2
Business v3
Auto Payments v1
Auto Payments v3
Direct Payments V1
Payments
Errors
I dont want to see any(either lower case or upper case) 'V1' or 'V2'.......'Vx' . I want see like below
Type:
Business
Auto Payments
Direct Payments
Payments
Errors
Regards,
Sunny
If you have the freedom to patch in your script (instead of in the UI), you can use MapSubString to patch any string away. For example:
MapAwayVersions:
MAPPING
LOAD ' ' & IF (div(RecNo()-1, 10) = 0, 'v', 'V') & mod(RecNo()-1, 10) AS f1, '' AS f2
AUTOGENERATE 20;
RawData:
LOAD Type, MapSubString('MapAwayVersions', Type) as TypeCorrected INLINE [
Type
Business v1
Auto Payments v2
Business v2
Business v3
Auto Payments v1
Auto Payments v3
Direct Payments V1
Payments
Errors
];
produces this, and remains easily adaptable.
Best,
Peter
[Edit] Added your extra check values Payments & Errors.
if(upper(left(right(Type,3),2))=' V',left(Type,len(Type)-3),Type) as Type,
For this data, you can do simple like below
=left(Type, len(Type)-2)
Thank you for your reply,it should work for my requirement but i have a one doubt ,i dont want to any uppacase just i can consider lower cases in that case how do we approach .
extra fileds added :
Type:
Business v1
Auto Payments v2
Business v2
Business v3
Auto Payments v1
Auto Payments v3
Direct Payments V1
Payments
Errors
HI,
As said by Anil it is working properly,
=left(Type, len(Type)-2)
I got the output as follows as your requirement
Thank you Anil for your reply ,i have missing something in my reuqiurement.your logic should work my given requirements please check the below requirement as well:
Type:
Business v1
Auto Payments v2
Business v2
Business v3
Auto Payments v1
Auto Payments v3
Direct Payments V1
Payments
Errors
Hi ,Can you please provide the logic for the below requirement as well
Type:
Business v1
Auto Payments v2
Business v2
Business v3
Auto Payments v1
Auto Payments v3
Direct Payments V1
Payments
Errors
Even, this case his solution works. Can you share updated output because I gone thru your reply. Seems you need only to get for lower.
If you have the freedom to patch in your script (instead of in the UI), you can use MapSubString to patch any string away. For example:
MapAwayVersions:
MAPPING
LOAD ' ' & IF (div(RecNo()-1, 10) = 0, 'v', 'V') & mod(RecNo()-1, 10) AS f1, '' AS f2
AUTOGENERATE 20;
RawData:
LOAD Type, MapSubString('MapAwayVersions', Type) as TypeCorrected INLINE [
Type
Business v1
Auto Payments v2
Business v2
Business v3
Auto Payments v1
Auto Payments v3
Direct Payments V1
Payments
Errors
];
produces this, and remains easily adaptable.
Best,
Peter
[Edit] Added your extra check values Payments & Errors.
This is Also Correct