Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

jood_ahmad
Not applicable

text after char

Dears,

how can i get the text after specific char like if i have :

ad,sj2

0,2

0,10

jak,kavin

and i need the just to retrieve only the char after the ','  i try the right but i cant apply it in all cases some time i did not get the right data

any idea about this .

1 Solution

Accepted Solutions
jood_ahmad
Not applicable

Re: text after char

Dears,

thank you very much to your replay the closest answer is Sunny

SubField(FieldName, ',', 2) as NewFieldName 


the addition thing is define a variable to count how mane char after the ',' .


thank you all

11 Replies
sunny_talwar
Not applicable

Re: text after char

Have you tried SubField()?

May be this:

SubField(FieldName, ',', 2) as NewFieldName

or

SubField(FieldName, ',', -1) as NewFieldName

balrajahlawat
Not applicable

Re: text after char

Sunny, with this expression he will get complete subfield from specified location but as asked by him


and i need the just to retrieve only the char after the ','

I think he need char only, like say

ad,sj2    Here he should get sj onlly instead of sj2

Ahmad, Is it right??

sunny_talwar
Not applicable

Re: text after char

May be this in that case?

PurgeChar(SubField(FieldName, ',', 2) as NewFieldName, '0123456789') as NewField

mohsinqlik
Not applicable

Re: text after char

Adding to logic sunny shared

purgechar(SubField(FieldName, ',', 2),1234567890) as NewFieldName


Regards,

Mohsin

balrajahlawat
Not applicable

Re: text after char

Good One Sunny

Will this alias work inside the field parameter?

sunny_talwar
Not applicable

Re: text after char

Thanks man

sunilkumarqv
Not applicable

Re: text after char

perhaps you can use like this

subfield(PurgeChar(FieldName,'0123456789'), ',',2)  as NewField

jood_ahmad
Not applicable

Re: text after char

yes

jood_ahmad
Not applicable

Re: text after char

Dears,

thank you very much to your replay the closest answer is Sunny

SubField(FieldName, ',', 2) as NewFieldName 


the addition thing is define a variable to count how mane char after the ',' .


thank you all