Strange result of view selection formula

Hi,I have a very strange of view selection formula result.

A notes view with following formula:


SELECT (Form = “Commitment Line”) & (SoftDelete != “Y”) & (!@Contains(CommitmentStatus; “Delete”)) & (@Contains(CommitmentStatus; “Accrued”) | @Contains(CommitmentStatus; “Accrued(Invoiced)”) | @Contains(CommitmentStatus; “Accrued(Submitted for payment)”) | @Contains(CommitmentStatus; “Accrued(Paid)”)) & (!@Contains(CommitmentStatus; “Accrued(Released)”)) & (jamount_5 - iamount_1!=0)


Everything is fine, however, I have 4 documents which should not be shown on the view, and they are there.

the only strange thing is : (jamount_5 - iamount_1!=0).

I have checked the property of those 4 documents, the Jamount_5 - iamount_1 = 0, so it should not be displayed on the view. But it appear there. The column of that view (jamount_5 - iamount_1!=0) = 0 for 2 documents, the other two documents shows -0 (which should be 0).

So two documents match the formula (jamount_5 - iamount_1=0), another two documents do not match, (jamount_5 - iamount_1=-0) which is confused from document property, it should be 0.

Anybody know what happend for this special case. I may need to change my formula: (jamount_5 - iamount_1!=0)

Thanks for any responses

Subject: RE: Strange result of view selection formula

You’re dealing with floating-point binary numbers here. Not every decimal fraction can be exactly represented. Try:

@Abs(jamount_5 - iamount_1) <= 0.0001

or something like that.

Subject: RE: Strange result of view selection formula

Hi Andre,You gave me more hints, thanks a lot for your help,

Instead of “<” , I think it should be “>”.

I changed that partion formula as: @Abs(jamount_5 - iamount_1) >= 0.0001

This solves the problem,

Appreciate your help,