Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

hi guys

what s subfield?

5 Replies
Anonymous
Not applicable
Author

You can find it in the QlikView Desktop Help.  I have pasted in the entry below.

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

In its three-parameter version, this script function returns a given substring from a larger string s with delimiter 'delimiter'. index is an optional integer denoting which of the substrings should be returned. If index is omitted when subfield is used in a field expression in a load statement, the subfield function will cause the load statement to automatically generate one full record of input data for each substring that can be found in s.

In its two-parameter version, the subfield function generates one record for each substring that can be taken from a larger string s with the delimiter 'delimiter'. If several subfield functions are used in the same load statement, the Cartesian product of all combinations will be generated.

Examples:

(For three parameters)

subfield(S, ';' ,2) returns 'cde' if S is 'abc;cde;efg'

subfield(S, ';' ,1) returns NULL if S is an empty string

subfield(S, ';' ,1) returns an empty string if S is ';'

buzzy996
Master II
Master II

it's used to fetch portion of data from input data.

Anonymous
Not applicable
Author

Hi Srikanth,

just try to search in community search box before posting the qtn ... trust me you will get very good ans .

try to filter result in Blog, documents.

String Functions

Hope it will help you.

Thanks

BKC

prabhas277
Creator
Creator

Hi

The subfield syntax like this

subfield (string, 'delimiter' [ , index ] )   It is used to get some portion data from the string based on the delimiter.


Regards,

prabhas

Not applicable
Author

HiSrikanth,

subfield(string,'delimeter',index)

subfield('srikanth.qlikview.learner),'.',-1)  -  it returns  learner

subfield('srikanth.qlikview.learner),'.',1)   -  it returns srikanth

subfield will return the portion of the data from the string based on delimeter separated

in above example  delimeter is  .