Categories





IM me on the bleedyellow.com sametime community - jeremy.hodge@zetaone.com

« THEY BROUGHT IT BACK | Main| Open Attachment based on file extension »

Negative Number Madness in a Column Formula

QuickImage Category    
0

Ok, from the WTF? category .... Ever try to take two positive number, and in a view total their difference? So for example, I have two forms, Form A's field XYZ is 15 Form B's field ABC is 10 .... I want to put them both in the same column, make Form A's XYZ field negative, leave Form B's ABC positive, then total them, giving me the difference of all the values in the column total...

So your column formula could read

@if(Form = "FormA"; -XYZ; Form="FormB"; ABC; 0)

or

@if(Form = "FormA"; (-1) * XYZ; Form="FormB"; ABC; 0)

That would get what you would expect right????


Wrong...

Check out the screen shot....  Where is this .00000000000001 coming from ???.  In this view 99.475 is the correct total, Not 99.475000000000001 ... change the formula to not turn the positive into a negative on the one form
, and it adds correctly. Get rid of ABC and put 0, it returns the correct number, get rid of -XYZ or (-1) * XYZ, it returns the correct number ... return them both, and hello massively small number added to the sum.  WTF?

Post A Comment