Force Text Field to only contain numbers - InfoPath Dev Sign in | Join | Help in Newbie Questions InfoPath (Entire Site) InfoPath Dev InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects. Home Blogs Forums Photos Downloads InfoPath Dev » InfoPath » Newbie Questions » Force Text Field to only contain numbers Force Text Field to only contain numbers Last post 09-09-2019 12:31 AM by ktitchard. 4 replies. Page 1 of 1 (5 items) Sort Posts: Oldest to newest Newest to oldest Previous Next 08-13-2019 07:21 AM ktitchard Joined on 03-08-2019 Posts 11 Force Text Field to only contain numbers Reply Contact My second question in relating to the Leading Zeros post. Can I force a Text Field to only allow numbers? And yes it has to be a text field because the data goes to Orchestrator which has complex PowerShell in there. 08-19-2019 08:34 AM In reply to Hilary Stoupa Joined on 06-20-2008 Posts 13,297 Re: Force Text Field to only contain numbers Form1.xsn Mark as Not AnswerMark as Answer... Reply Contact Yes, you can do this with a validation rule. See attached - save the file locally, right click, select design, then preview. The validation is a rule on field1. Hilary Stoupa 09-06-2019 03:59 AM In reply to ktitchard Joined on 03-08-2019 Posts 11 Re: Force Text Field to only contain numbers Mark as Not AnswerMark as Answer... Reply Contact Thanks for the reply. I have applied the validation but as soon as I lose focus of that text field it reverts to 1 from 001. I think it might be something to do with SharePoint forcing the field to TextType? 09-06-2019 08:22 AM In reply to Hilary Stoupa Joined on 06-20-2008 Posts 13,297 Re: Force Text Field to only contain numbers Mark as Not AnswerMark as Answer... Reply Contact If your field has a datatype of number, this will happen. Can I see your form? Hilary Stoupa 09-09-2019 12:31 AM In reply to ktitchard Joined on 03-08-2019 Posts 11 Re: Force Text Field to only contain numbers Mark as Not AnswerMark as Answer... Reply Contact I deleted the field in SharePoint and created it again within InfoPath, uploaded the templated and it now works. Thanks Page 1 of 1 (5 items) Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.
My second question in relating to the Leading Zeros post. Can I force a Text Field to only allow numbers? And yes it has to be a text field because the data goes to Orchestrator which has complex PowerShell in there.
Thanks for the reply. I have applied the validation but as soon as I lose focus of that text field it reverts to 1 from 001. I think it might be something to do with SharePoint forcing the field to TextType?