Service Manager / Service Center Practitioners Forum
Showing results for 
Search instead for 
Do you mean 

validation not working

SOLVED
Go to Solution
Frequent Advisor

validation not working

Hi ,

 

I am doing the below validation in FC , here when i enter 6,7,8,9 number in field i am getting the validation, But it should not happen, This error is coming when i enter 6 or 7 or 8 individual number

 

Validation : $min>=0 and $min<=59

Message : Please enter "mins" value 0 to 60

Update: not null($min)

Set FOcus To : $min

 

Please help me

3 REPLIES
Honored Contributor Honored Contributor

Re: validation not working

Hi,

 

Maybe it is not recognizing your $min as a number and is instead treating it as a string.  To test this, try changing your validation to:

 

Validation : val($min, 1)>=0 and val($min, 1)<=59

 

The val() function converts data types and the 1 tells it to convert it to a number.

 

Audrey

Frequent Advisor

Re: validation not working

Hi Audrey,

Thank you very much for the solution. it was working perfectly
Highlighted
Honored Contributor Honored Contributor

Re: validation not working

Hi,

 

This was really just a test to see if that was the reason your validation was triggering unexpectedly.  Do you care that your variable is sometimes being recognized as a string and not a number?  Are you doing something with the number in the variable?  If you don't care, then this would work as a "solution", but if you really want your variable to contain a number then you should do the conversion to the actual variable on the save event and then you could leave your validation as it was.

 

Audrey