Re: Validation for field with one decimal value (162 Views)
Reply
Advisor
DivyaMurali
Posts: 31
Registered: ‎03-26-2012
Message 1 of 6 (192 Views)

Validation for field with one decimal value

Hi,

 

I would like to create a validation to accept values from 0 to 99.9 for a field in Request type .

 

I have tried to create a validation same as Numeric Text Field - 2 decimals (seeded validation) for one decimal place. However in max value field, i am not able to mention 99.9

It allows me to enter only whole numbers(either 99 or 100)..But as per my requirement, the field should accept values till 99.9 only.

 

Can anyone please suggest me how to do it?? Appreciate your response!

 

 

Thanks & regards,

Divya

 

Please use plain text.
Trusted Contributor
kwood55
Posts: 131
Registered: ‎04-09-2012
Message 2 of 6 (162 Views)

Re: Validation for field with one decimal value

I am not an expert with validations:

- The attached validation allows 0, 0.1, ..., 99.9, 100

- You do not want the 100

- Can you use the validation and then add a rule to throw away the '100'.

   Not hat user friendly but users may figure it out.

Please use plain text.
Advisor
DivyaMurali
Posts: 31
Registered: ‎03-26-2012
Message 3 of 6 (149 Views)

Re: Validation for field with one decimal value

Thanks for the response!

 

I was using the same validation. As you had suggested, I used  two rules to check for values 100 and to nullify the value.

 

In this case, when the validation fails, the message "The field cannot be greater than 100" is displayed.

If the rule fails, the message "The field cannot be greater than 99.9" is displayed.

 

There is a contradictory in the dispalyed message. Can anyone please suggest an option for this?

 

 

Please use plain text.
Trusted Contributor
kwood55
Posts: 131
Registered: ‎04-09-2012
Message 4 of 6 (136 Views)

Re: Validation for field with one decimal value

Did you try the Text Field - Custom

- 0 must be entered as 00.0

- But the attached validation does restrict to your exact range.

- Not sure what user error is displayed.

Please use plain text.
Occasional Advisor
VinaykumarDH
Posts: 5
Registered: ‎01-30-2013
Message 5 of 6 (67 Views)

Re: Validation for field with one decimal value

I have similar kind of requirement, for a numeric validation I should have minimum value as 0.1 but the validation does not allow 0.1 as minimum value, is there any workaround. I am using popup message if 0 is entered but user can still go and save the data.

 

Is there a way to clear the data on field change?

Please use plain text.
Advisor
Rash
Posts: 30
Registered: ‎07-29-2010
Message 6 of 6 (51 Views)

Re: Validation for field with one decimal value

Hi Vinay,

 

You can write a On page load evented rule which checks for the condition i.e the field =0 then clears(NULL) the field .

SO this rule will be placed after the pop-up message rule..

 

Cheers,

Rash

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation