Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
jcampbell474
Creator III
Creator III

Variable not always updating on reload

I have a variable that an nPrinting condition checks to determine whether or not to send an hourly email. 

The variable vSendEmail works every time when I manually reload the app.  It also works almost every time throughout the day.  But, there's usually just one interval every day where it doesn't.  It's not a specific interval, seems rather random.

My script is below.  Does anything look like it could cause this behavior?

Any help will be greatly appreciated.

MaxIntvl:

Load

  Date(max(intstartdte)) as maxIntvlDate

  ,TIME(MAX(intstartdte), 'hh:mm TT') as maxIntvlroundtime

  ,Num(MAX(intstartdte)) as maxIntvlroundtimeNum

Resident IntervalData;

Let vmaxIntvldate = peek('maxIntvlDate');

Let vmaxIntvlroundtime = peek('maxIntvlroundtime');

Let vmaxIntvlroundtimeNum = peek('maxIntvlroundtimeNum');

Drop Table MaxIntvl;

Let vReloadTime# = ReloadTime();

Let vReloadTimeOnly# = Time(ReloadTime()-.0416666666666667,'hh:mm TT');

Let vReloadTimeOnly#Num = Num(ReloadTime()-.0416666666666667);

Let vSendEmail = If(Date(Today(1)) = '$(vmaxIntvldate)' and '$(vmaxIntvlroundtimeNum)' > '$(vReloadTimeOnly#Num)','Yes','No');

1 Solution

Accepted Solutions
jcampbell474
Creator III
Creator III
Author

Problem solved.  I just compared fields instead of variables.

View solution in original post

1 Reply
jcampbell474
Creator III
Creator III
Author

Problem solved.  I just compared fields instead of variables.