Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I have a small problem.
I'm pretty new with qlikview, and I'd appreciate your help.
I have a values in table that is a path to a file.
Ex: c:\qlikview\projects\testOne\some other files
c:\qlikview\projects\testTwo\some other files
c:\qlikview\projects\testFive\some other files
I would like to extract the part between projects\ and \some other files.
Because it is not always the same number of characters, i do not know how to do it.
Please help
subfield("FieldName",'\',4) should return testOne, or testTwo etc.
Where "FieldName" is the name of the field containing your strings
subfield("FieldName",'\',4) should return testOne, or testTwo etc.
Where "FieldName" is the name of the field containing your strings
Where will you be using these new strings?
Could you explain please how it works?
I'll use it like a field that can be selected.
Here is the syntax from the QlikView Help docs:
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.
for example subfield('c:\qlikview\projects\testOne\some other files','\,4) will return the string 'testOne'
Thanks, you are the best
No problem! Good luck