If you want to create a Telephone format on a infopath form : 1. Add a text field to the form (Even if it is the list or a blank form) 2. Select the text box and click on Manage Rules 4. Add a rule to your textbox control with the following conditions (make sure to select "and" operator): a. field "does not match pattern" Phone number b. the expression: string-length(translate(., "()- ", "")) = 10 c. the expression: string-length(translate(., "()- 0123456789", "")) = 0 5. Add action to the rule: a. Set a field's value b. Select your textbox field c. Insert formula for the value (click the fx button): concat("(", substring(translate(., "()- ", ""), 1, 3), ") ", substring(translate(., "()- ", ""), 4, 3), "-", substring(translate(., "()- ", ""), 7, 4)) Link for the detailed explanation : http:
Comments
Post a Comment