Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
sum( {$<Year = {$(#vMaxYear)},Period = {">0 <=$(#vMaxPeriod)"}, CID = {2}>} Value )/1000
i have this formula in an inline script and now i want to have it in a variable.
The looping though the inline is no issue, but that exactly do i need to replace with CHR36 and how?
Thanks in advanced
Try this:
LET vExpression = 'sum( {$<Year = {$' & '(#vMaxYear)},Period = {">0 <=$' & '(#vMaxPeriod)"}, CID = {2}>} Value )/1000';
Or this:
SET vExpression = sum( {$<Year = {@(#vMaxYear)},Period = {">0 <=@(#vMaxPeriod)"}, CID = {2}>} Value )/1000;
LET vExpression = replace('$(vExpression)','@','$');
Amien
chr(36) is the $ sign.
Here is an example where I have used it to set a variable.
Let vSetMTYesterday='
[Scheduled Arrival Date LT] = ,
[Date] = ,
[Day] = {"<=' & chr(36) & '(=day(today()-1))"} ,
[Month] = ,
[Month Year] = ,
[MonthNum] = {"' & chr(36) & '(=num(month(today() ) ) )"} ,
[Year] =
';
Best Regards, Bill
Amien
So you'll probably need to change your one to something like this:
sum( {$<Year = {' & chr(36) & '(#vMaxYear)},Period = {">0 <=' & chr(36) & '(#vMaxPeriod)"}, CID = {2}>} Value )/1000
Best Regards, Bill
Try this:
LET vExpression = 'sum( {$<Year = {$' & '(#vMaxYear)},Period = {">0 <=$' & '(#vMaxPeriod)"}, CID = {2}>} Value )/1000';
Or this:
SET vExpression = sum( {$<Year = {@(#vMaxYear)},Period = {">0 <=@(#vMaxPeriod)"}, CID = {2}>} Value )/1000;
LET vExpression = replace('$(vExpression)','@','$');
Thanks, but for some reason this is not working when i formula is in a inline script
nevermind .. my bad .. worked .. thanks