Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am trying to implement a macro that does a field selection, based on a list of items in a variable.
Consequently the variable in question will be a string where the items are seperated by ','.
I tried achieving this through a substring creation.
THat way I get the count of items, as well as can extract the items individually.
Qlikview does not accept the standard macro commands 'Substring' or 'SubStr' .
How can this substring search be done in a Qlikview macro ?
Thank you
You can use the instr function. Instr("Hello, World!",",") returns 6 which is the position of the comma in the string. Something else you can use is the activedocument.Evaluate function which allows you to evaluate qlikview expressions. activedocument.Evaluate("subfield('Hello, World!',',',1)") returns "Hello".
You can use the instr function. Instr("Hello, World!",",") returns 6 which is the position of the comma in the string. Something else you can use is the activedocument.Evaluate function which allows you to evaluate qlikview expressions. activedocument.Evaluate("subfield('Hello, World!',',',1)") returns "Hello".