Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
I am facing an issue I am using a variable at script as SET Var1=sum({$<Date={">=$(Date(Max(Date)-7))<=$(=Max(Date))"}>}Mencount)
when I am using this expression in text box I am getting 10.5 and if I am using the variable directly into text box as $(Var1) I am getting 12.6 ,not able to understand why???Please help in understanding this.
Thank you
Regards
Ferha
Not sure why you would get different results. Would you be able to share your application or a sample?
No chance of getting different value, once can check the expression
could you share the sample application.
normally there should not be a difference in the answers.
do you have alternate states in the application. then the values could differ depending on the state in which the formula is.
Hi,
Its preferable to use 'num' of date field in the variable, and convert the variable into date after variable is evaluated.
Try this.
SET Var1=sum({$<num(Date)={">=$(Date(Max(num(Date))-7))<=$(=Max(num(Date)))"}>}Mencount)
and use the variable as date(Var1)
the exp
Var1=sum({$<Date={">=$(Date(Max(Date)-7))<=$(=Max(Date))"}>}Mencount) gives correct value everywhere but if I divide this variable by 13 in script this is not getting reflected in the calculation although if write $(Var1)/13 in the front end it is giving the correct value.
why this is happening not understand...
Are you doing it like this?
SET Var1=sum({$<Date={">=$(Date(Max(Date)-7))<=$(=Max(Date))"}>}Mencount)/13 and then $(Var1) doesn't seem to give the right result????
Right