Field Not displaying negative number

I’m stuck…I have a field which count downs from 30 minutes when a document opens. i got that part working nicely, but when it reaches 0, it continues in the negative, which I see if I did a prompt. If I try and display it in a field however it does not show as a negative, rather just a number.

Here is the coding I have in the field, which is a number field:

time := @Adjust(Time; 0; 0; 0; 0; 30; 0; [InLocalTime]);

newtime := @Abs(@Integer(time - count) / (60));

@If(@Sign(newtime) = -1; “0”; newtime)

It works great for the countdown until it passes 0. I cannot get the field to display the negative

Thanks

Subject: Field Not displaying negative number

well your IF statement says that if newtime is a negative number then display “0”. If you want to display the negative number then just take out the IF statement.

Subject: RE: Field Not displaying negative number

the code doesn’t action at all…It just displays the number in the field, but instead of going down it’s going up. I have a button to display the information an in the prompt it displays a negative.

Basically the If statement should just keep the field a 0 if it’s a negative…But it doesn’t

Subject: I’m an idiot!

Well I solved my own issue…Where I had @Abs(@integer…I should have had @Sum(@Integer

I had the @Sum on my push button which displayed the negative, but in the field I had @Abs…Both worked on the countdown, but the @Sum displayed the negative number…Ugh…It’s Friday…

Thanks for the reply.