Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
I have a variable which works fine when added manually to Settings > Variable Overview but does not work when loaded in from a text file via the load script.
Here is the expression:-
=if(isnull(GetFieldSelections(Metric_List)) or wildmatch(GetFieldSelections(Metric_List),'Customer Count'),
num(sum({<CA={'1'} >} CUS),'###########,###'),
num((sum({<CA={'1'} >} $(vMetric_Percent))/sum({<CA={'1'} >} CUS)),'#,##0.##%'))
The variable reference is vMetric_Percent which has this value inside it =MetricLookup.
When I try to load this expression from a text file unchanged instead of $(vMetric_Percent) it has been evaluated as =MetricLookup and therefore does not work.
Is there any way to get around this problem?
Thanks
Stuart
May be check this out:
Re: Stop Dollar Sign Expansion in the script (Escape Character ??? )
Can you check this in Text object and see whether the value is coming up over there?
=$(vMetric_Percent)
And then, What you have written for Variable and where do you written(I mean Variable overview / Script)
You're in need of something you could call "Delayed expansion". Meaning that the embedded $-sign construct should be expanded when the expression is evaluated (in a UI object), not when the text is assigned to the expression variable.
There are a number of techniques for avoiding this effect. Sunny has already shown a few. Here are some others:
Best,
Peter