Changing Field Format

T

thefonz37

I have a form for employee time off requests. There is a field for the hours
requested off and the type of request. My problem is that regular vacation
time off requests can only be made in whole hour increments, whereas FMLA
requests can be made in quarter-hour incremenets.

So the problem I'm having is basically a data validation one. I would like
the hours requested to only accept whole numbers if the type of request is a
set to "PTO", but have it accept a decimal value if the type of request is
set to FMLA. Is there a way to have the Infopath form change the data type
in one field based on the value given in another field?
 
S

Swathi

Hi,

Put a data validation on requested off field by following the below steps.

1.Go to type of request properties. and click on data validation.
2.Click on Add button to add a validation. There add the following conditions.
3.If request off = “PTO†and not(xdUtil:Match(string(.), "\d*"))
4.If request off= “FMLA†and not(xdUtil:Match(string(.), "\d*\.\d*"))


Hope this will help to you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top