Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
375
Value validation for calculated fields
posted

Hello,

how would I implement validation for calculated fields?

AFAIK and tested value constraints only work if the user actually enters a value. But what about calculated fields. For example: Say we have three frields [a], [b] and [c]. [c] is calculated by [a] * [b]. Let's assume that [c] has a mask "nn.nn". Now If [a] and [b] are 10 the result is 100 but the editor displays "00.00". 

Is there a way to either empty or display the correct calculated value?

Regards
Johannes 

Parents
No Data
Reply
  • 17475
    Offline posted

    Hello Johannes, 

    Thank you for posting. 

    I have been looking into the provided description regarding the displayed value in the editor. On my side the value of the editor is correctly calculated and displayed. I had attached a sample project XamNumEditorCalculatedValues.zip where a mask “nn.nn” is set for the XamNumericEditor. The shown value when [a] is 10 and [b] is 5 is 50,00. Please note that when the mask for the editor is set, the number of displayed digits might be more than the mask allows. For example when you have [a] = 10 and [b] = 10, [c] should be 100,00 but the mask “nn.nn” allows only two digits before the floating point. In order to allow the whole value to be displayed, you could set the mask to “nnn.nn”.

    If you have any questions, please feel free to let me know.

    XamNumEditorCalculatedValues.zip
Children