Expand my Community achievements bar.

SOLVED

Set a maximum value in € for a numeric field

Avatar

Level 2

I'm new to LiveCycle Designer. I'm creating a form which contains some numeric fields that are set to € values. I've managed to set the patterns too max 2 decimals.

Now I want to set a max value in € for those fields. For example. One field can only have a max amount of €2,84. I want the field to allow anything lower than that, but disallow everything above the €2.84. I've looked through the program, but can't find anything at all that looks similar to what I want...I'm guessing that I'm searching on the wrong keywords (see subject). Any help would be appreciated.

1 Accepted Solution

Avatar

Correct answer by
Level 10

You can use scripting to check the value.

This JavaScript in the exit:Event will do this, then it will warn the user if the value is above 2.84 and correct the value back to 2.84.

View solution in original post

3 Replies

Avatar

Level 2

In the meantime I forgot to mention I tried to use (still trying really) the Action Builder where I tried to set the following:

Condition

When numeric field FieldName is greater than 2,84

Result

Show a message box with the following message: Test

Set the title: Test and the icon: ...

But this doesn't work at all. It doesn't matter if I fill out 2.84 or 1.66 or 3.12. It just pops the message box.

Seems totally unlogical and kinda works frustrating....

what am I doing wrong?

Avatar

Correct answer by
Level 10

You can use scripting to check the value.

This JavaScript in the exit:Event will do this, then it will warn the user if the value is above 2.84 and correct the value back to 2.84.

Avatar

Level 2

Sigh. that "easy"...thanks for the quick help! This seems to work better and faster than the tool builder.