Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Im having trouble with an If( Function in my Qlikview Load.
In the datafiles, its possible to select 'favorite' fields that are marked with a star symbol in the
Qlikview Logfiles. The character code for that star is: chr(9734)
Now I want it to be possible that I delete the star symbol when its occurring in the table value.
I used an If( function like this: If(Wildmatch(Message, chr(9734)), PurgeChar(Message, chr(9734)))
But it didn't work.
Maybe its part of the If function or the Purgechar that wont work.
Anyone can help me with this issue?
Thanks in Advance!
Ivo
Thanks for all the replies guys!
I figured out how to solve my problem by using multiple Replace() functions.
That, because the original message line was "Chart: 'Star symbol' text.
I replaced the 'Chart: Star symbol' part, the 'Chart: ' part and the 'star symbol' part in this order.
Replace(Replace(Replace('_Chart: ☆ ',''), '_Chart: ', ''), '☆ ', '') <- Like this
Do you mean, you want to delete Star from that list?
Update: Just use
PurgeChar(Message, chr(9734))
You can play round to achieve this
Or
replace(Message,chr(9734),'')
Thanks for your reply
I've tried different things with the PurgeChar function, but it doesnt work...
I dont know if its because of the chr(9734) or something else.
I really think it has to do with they function itself.
If I put in another character or line of text, it doesnt work either.
Are you still using the Wildmatch function? If so you need to change that a bit:
If(Wildmatch(Message, '*' & chr(9734) & '*'), PurgeChar(Message, chr(9734)))
Otherwise you'll only get a match in Message contains only that star character and no other text at all.
The purgechar function works in a test here. If it doesn't work for you then perhaps the star character you see is not chr(9734) but another character.
You can also try the keepchar function: Keepchar(Message, '0123456789abcdef...etc...xyzABCDE....etc...XYZ')
Directly input as text
Example
purgechar('☆TODAY' ,'☆')
PurgeChar() should work for you.
If it is still not working then as Gysbert said, it might be some other character.
Try using Vineeth's exp, i.e directly copy that character in your exp.
Thanks for all the replies guys!
I figured out how to solve my problem by using multiple Replace() functions.
That, because the original message line was "Chart: 'Star symbol' text.
I replaced the 'Chart: Star symbol' part, the 'Chart: ' part and the 'star symbol' part in this order.
Replace(Replace(Replace('_Chart: ☆ ',''), '_Chart: ', ''), '☆ ', '') <- Like this
Even this will work , purgechar(MESSAGE ,'_Chart: ☆')
No need for so many Replace()'s