cancel
Showing results for 
Search instead for 
Did you mean: 

How to validate a Numeric Field in an Interactive form

Former Member
0 Kudos

Hi,

In my Interactive form i had placed certain Numeric Fields (Price Information). The user may change the pricing info. My requirement is, the user enters any numeric data the form should show an alert message and revert back the pricing information to the existing one.

Please help.

Thanks

Ranjan

Accepted Solutions (1)

Accepted Solutions (1)

markus_meisl
Active Contributor
0 Kudos

Hi Ranjan,

I guess you are talking about the display format of the pricing information.

You can adapt this by using the Object tab of the Numeric Field. You can enter the desired Display Pattern on the Field tab (possibly also an Edit Pattern), and work on the message on the Value tab under Validation Pattern Message.

In the Designer documentation, look for, for example, the topic entitled 'Numeric field properties in the Field tab'.

Kind regards,

Markus Meisl

SAP NetWeaver Product Management

Former Member
0 Kudos

Hi Markus,

Is there any way , I can prevent the user from entering characters in a numeric field?

Thanks and Regards,

Kavita

Message was edited by: Kavita Sardesai

Former Member
0 Kudos

Hello Kavita,

patterns are not processed during editing. If you can't use the default behavior of the numeric field when a character is entered (handled when the user finished editing), you could use scripting to process input. Depending on what you want to do you could use the exit event or the change event.

A change event has a property called "change" that caused the event. You could try "xfa.host.messageBox( upper(event.change) )" in FormCalc to show the characters in upper case.

But, you should go this way only if the patterns for editing and for display and validation scripts can't be used in your case.

Best regards

Juergen

Answers (0)