Discussion Board for collaboration related to QlikView App Development.
Hi All,
I have to assign value to a variable inside 'If' statement in an object and not in the script .
Example:
if(second(now())=0,vShow=1,vNext=1)
When I see variable overview the value has not been set for vShow and vNext.
or Please provide some other method to achieve above requirement.
Kindly respond
Regards,
Dinesh M
But i see you want this in the front end, not in script. Do you want this to be dynamic and continuously calculated? Define them in the script like this:
Set vNext = '=if(second(now())=0, 1, 0)';
Set vShow = '=if(second(now())=0, 1, 0)';
Now the value will continuously update in the front end (providing you are using QV desktop or the IE plugin).
Were are you placing the if statement?
and what do you aim to achieve?
Let vNext = if(second(now())=0, 1, 0);
Let vShow = if(second(now())=0, 1, 0);
But i see you want this in the front end, not in script. Do you want this to be dynamic and continuously calculated? Define them in the script like this:
Set vNext = '=if(second(now())=0, 1, 0)';
Set vShow = '=if(second(now())=0, 1, 0)';
Now the value will continuously update in the front end (providing you are using QV desktop or the IE plugin).
Thanks a lot Jonathan the solution you gave is working .
But the application goes 'not responding' often is there a way to minimize that.
Now() updates at a millisecond rate, and if there are any expressions affected by vNext or vShow, that may cause your application to recalculate. Are either of these variables part of any chart expressions?
No, Jonathan the variable vNext and vShow are not part of any chart.
But, it is a part of variable event trigger which activates sheet when vNext=1 and same for vShow=1.
Thanks & Regards,
Dinesh M