Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

QSense
Contributor II

string function

Hello everybody;

Ihave a case in that there is one slash in value but the other value has 2 slashes

I want get red lined values

Both of them have same properties such as

From right side , ıt starts from first slash and it goes until @IPASS value

I tried to get value with textbetween function like

TextBetween(USERNAME,'/','@IPASS',2)

but it start from left side.

Thank you

IPASS/rc1Ttn3t@opstesting.com@IPASS

IPASS/0U2hdL90f7/setudsh@alfalavalsmart@IPASS

Tags (1)
1 Solution

Accepted Solutions
flipside
Valued Contributor II

Re: string function

Hi,

There are a few solutions to this - you could use one of the others posted on the other thread, or use something like this ...

=Subfield(TextBetween('IPASS/0U2kkSH00S/zhangchen.zhang@hcn@IPASS','/','@IPASS',1),'/',-1)

flipside

5 Replies

Re: string function

HI

Try like this

=TextBetween('IPASS/0U2hdL90f7/setudsh@alfalavalsmart@IPASS','/','@IPASS',SubStringCount('IPASS/0U2hdL90f7/setudsh@alfalavalsmart@IPASS','/'))

=TextBetween(UserName,'/','@IPASS',SubStringCount(UserName,'/'))

hope it helps

flipside
Valued Contributor II

Re: string function

Hi,

There are a few solutions to this - you could use one of the others posted on the other thread, or use something like this ...

=Subfield(TextBetween('IPASS/0U2kkSH00S/zhangchen.zhang@hcn@IPASS','/','@IPASS',1),'/',-1)

flipside

Not applicable

Re: string function

Hi people!

IPASS/rc1Ttn3t@opstesting.com@IPASS

You should try the function e.g

subfield(USERNAME, '/' ,1)

returns rc1Ttn3t@opstesting.com@IPASS

And to remove the @IPASS you should use the function

replace(USERNAME,'@IPASS','')

returns rc1Ttn3t@opstesting.com

subfield(replace(USERNAME,'@IPASS',''),'/',1)

returns rc1Ttn3t@opstesting.com

Not applicable

Re: string function

  Hi,

use below one

= SubField( TextBetween ( USERNAME ,'/','@IPASS',1),'/',-1)

Niranjan M.

Not applicable

Re: string function

use below one. u will get require answer

let a='IPASS/0U2hdL90f7/setudsh@alfalavalsmart@IPASS'

=mid($(a),index($(a),'/',-1)+1,(index($(a),'@',-1)-1)-(index($(a),'/',-1)))

Community Browser