Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to escape variable parameter with both quote and comma

Hi Everyone

Variable function is useful for defining the reusable business logic.

But I found in the variable parameter, it is risky if you have comma inside, because the variable function may treat it and parameter delimiter.

On the other hand it is also risky if you have quote in the parameter.

I have a simple use case:

I want to create a variable function like below:

vFF= num($1,$2);

$2 is the parameter for the format.

I found if you put value without comma, it is working. if u put in comma, it failed.

then I change to another approach:

EscapeCharsMap:
MAPPING LOAD * INLINE [
from, to
@,$
|,'
]
;

LET tt = MapSubString('EscapeCharsMap',
  'num(100, @(=Replace(|$1|, |;|, |.|)) )'
  );

This time, comma is working, but quote is not working.

can anybody have any solution?

1 Reply
ahaahaaha
Partner - Master
Partner - Master

Hi,

May be try to use instead of a comma Chr(44)?