Hello,
Is it possible to disable calculation if the value from a field which is an input field for a formula is null. Example:
Say we have 3 fields on the form:
- Field a: XamNumericEditor (no formula)- Field b: XamNumericEditor (no formula)- Field c: XamNumbericEditor (formula: [//a] + [//b])
Now when the window is loaded the calculation engine is triggered and field c will contain 0,00 as a value even though field a and b are empty.
Is it possible to change this so that field c is only calculated when all fields are filled with values (value != null)
RegardsJohannes
No one?
Hi Johannes,
Formulas are always evaluated - there is no way to conditionally prevent evaluation based on the source values. However you can use the IF and ISBLANK functions to get the desired result. If you use the following formula instead, it will evaluate to blank when one of the source values is also blank.
if( or(isblank([a]), isblank([b])), "", [a] + [b])
Hope this helps,
Sandip
Hi Sandip,
thanks for the reply. That helped indeed! And it even works in XamDataGrids. Many thanks
Hello Johannes,
Thank you for your replies. I am very glad that you have managed to solve the issues that you were having. If you have any question please do not hesitate to ask.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Just one quick addition to the solution "" did not work for me. I used Null(). This seams to work fine.