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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

subfield() using negative index

When used in a load statement, subfield can use a negative value for index. For example

LOAD subfield('a\b\c', '\', -1)  as X

will return "c". This is true when the first param is a literal or a field.

However:

LET z =  subfield('a\b\c', '\', -1)

will return null. Use in a chart expression will return null as well.

The doc does not say that a negative index is allowed. I just stumbled upon it accidentally some years ago.

My question is, should this work everywhere? Or nowhere? Is the doc in error (or am I in error)?

-Rob

Labels (2)
2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Maybe I misunderstand you, but I can't reproduce your However. Seems to work in 11.2SR5.


talk is cheap, supply exceeds demand
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP
Author

Hmm. After carefully(!) testing and documenting this, I can't recreate it either.

Question withdrawn.

-Rob