Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
karthikeyan1504
Creator III
Creator III

String right function not working properly

Hi all,

I have a single field value as mentioned below,

KSN_PXRU4471    001

From above value, I need the characters after underscore 'PXRU4471    001'.

When I tried with the formula of '=Right(ITEM_KEY,Index(ITEM_KEY,'_'))', I get an output as '0001'.

Could you please let me know whether I am missing anything?

Thanks & Regards,

Karthikeyan.

12 Replies
sunny_talwar

I think the issue is that the Index function gives you the location of the first instance of '_' which is at number 4 spot and that is why you see 4 character getting pulled from the right. In order to get to '_' from the right, you need to do Len(Field) - Index(Field, '_') -> Which will get you the number of characters to be pulled from right before you hit '_'

swuehl
MVP
MVP

Or just use

Mid( Field, Index(Field, '_')+1)

as suggested above.

(Or subfield(), but this only works in your case if the separator '_' is only occuring once).

edit:

My point is, choose the most appropriate solution for your setting. To be able to do this, learn more about string functions:

String functions ‒ QlikView

cbaqir
Specialist II
Specialist II

stalwar1

Sunny,

Is there some way I could use this type of syntax in the load script with the stripHMTL module?

TextBetween( stripHTML(DESCRIPTION) , 'Analytics:' , 'XXXXXXas ANALYTICS,

Analytics gets truncated in the field value so it's always something different. My thought was to use the Right() to identify the last few characters of the field as the ending point of the value for the new ANALYTICS field. Make sense?