Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Subfield in the QV script

Folks,


Why we use sub field in the script ? how does it work in the real world ? what is the syntax for this ? could you please provide few examples?


Anyone can please throw some light on this..

Kind regards,

Verendra.




2 Replies
PradeepReddy
Specialist II
Specialist II

Subfield() is used to get the some part of the String Data..

Syntax: subfield(s, 'delimiter' [ , index ] )

S - input String

Delimiter : on which Character basis you are trying to get the some part of the string.

Index : After dividing the input string into parts based on Delimiter, which part you required.

Ex:

Let S=abc@def@gh

subfield(S, '@' ,1) returns 'abc'

subfield(S, '@' ,2) returns 'def'

subfield(S, '@' ) returns 'abc'

Not applicable
Author

Thanks a lot Pradeep.

Best regards,

Verendra.