Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
a field in a tabelrecord wich shows based on 2 options wich i can filter,
option a
a$="INVOICE 200010 CUSTOMERCODE: 1296 KLM SHIPPING
here in VB i can do Code$ = mid$(a$,instr(a$,":")+1), 12)
option b
1296| 200010|KLM SHIPPING
here in VB i can do Code$ = left$(a$,instr(a$,"|")-1)
Now i have to do this qlikview during load something like:
if (option = 'a' , mid(a$,instr(a$,':')+-1),12) as Code,
if (option = 'b' , left(a$,instr(a$,'|')-1) as Code,
Please advice , thank you
Just replace instr() with index() and it should work nearly without further adjustments whereby the use of subfield() might be even more suitable.
- Marcus
Just replace instr() with index() and it should work nearly without further adjustments whereby the use of subfield() might be even more suitable.
- Marcus
Yes , this does the job
if(a = '1300' , left(Reason,index(Reason,'| ',1)-1),Mid(Reason,index(Reason,': ',1)+2,12)) as Code
Thanks a lot
regards Jack