I'm trying to create a form where I have multiple Input fields (for decimals) that are linked (the values should add up to 100).

But these fields are also optional.  The user has the choice to enter values or not.

If the user enters the value '0' in a field, then that should be considered different than not filling in the field.

I figured most of it out, but I'm stuck with one last 'bug'.  The value '0' is not handled the way I like.

If I enter 100 in the first field, the second field should get the value 0 (and show it!).  It does not.

If both fields have the values 100 and 0, and I clear the field with value 100, then the second field should be cleared (and not show the 0).  It does not.

Everything else works.

I've created a .oml that shows this behaviour in its simplest form (The actual application has multiple sets of 'linked' fields like this.  The user does not need to fill them all in.  And it's important to know which ones were filled in, and which ones were not.).

Below is a screenshot of the attached test application:

Hi Steven,

Basically you want to 0 mean different things depending on the context. That is not possible out of the box since 0 is always the null value of an integer. One way of achieve that is for example if you always only have numbers between 0 and 100 you can initialize your variables with -1. -1 represents not being filled by the user and 0 represents the 0%.

If you have any doubt let me know.