Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

variables defined in script

Hi,

I like to define my variables in script, in case my qvw gets screwed (and I find it more easy to make changes after that).

So I define them like this for instance :

set comite_init = NUM(LEFT($(comite),4),'0000')   & '01';

But in the case there are $ sign expansions in the variable, qv replace it with the value of the other $() variable.

How do i get to write :

set year_plus_1 = $(this_year) + 1

without qv transforming it into 2013+1

?

Thanks

Tags (1)
1 Reply

Re: variables defined in script

This works:

set year_plus_1 = @(this_year) + 1;

let year_plus_1 = replace(year_plus_1,'@','$');

Or simply like this:

let year_plus_1 = '$' & '(this_year) + 1';



talk is cheap, supply exceeds demand
Community Browser