Tag Archives: InfoPath 2013

Infopath: Get User Profile Data into your form

I needed to populate a drop down list with all the departments in my university (this is a field that is part of the user profile data.) Through my searching I stumbled through the UserProfileService.asmx and could not easily figure it out. I finally stumbled on a post from the famous Laura Rogers that explained a super easy way to … Continue Reading

Posted in InfoPath, SharePoint | Also tagged , , Leave a comment

InfoPath: Calculate Age based on Date of Birth date picker.

I needed to calculate the age of a person to run some validation rules on my form. This is how I did it: Create a Date Picker field (I named mine Birth Date) and place it on the form. Create a Number field (I named mine Age.) You don’t have to place it on the form, though you can initially … Continue Reading

Posted in InfoPath, SharePoint | Also tagged , , 2 Comments

InfoPath: Validate that form has an attachment

I have found that I often need to make sure that people attach a file before they can submit. InfoPath will not let you run a rule on attachment fields however there is a way around it: Create a single line of text field to use as the validation field (name is something like Attachment Validation). This field is also … Continue Reading

Posted in InfoPath, SharePoint | Also tagged , , Leave a comment

SharePoint – InfoPath: Validate attachment URL for special characters

I did a ton of searching for this and could only find 1 solution. With this solution, if you have special characters in your file name and hit submit a warning pops up and tells you that  you have special characters in your file name. It will not let you submit the form until that is fixed. The solution is … Continue Reading

Posted in InfoPath, SharePoint | Also tagged , Leave a comment

Infopath: Limit decimal places to display for a calculation

We were adding up monetary fields and found that the calculation was giving us to many decimal places. Below you will find the solution to get them back to 2: Round to 2 decimal places:  round((calculation) * 100) / 100 Round to 3 decimal places: round((calculation) * 1000) / 1000 Example: Formula: round((1.5555*42)*100) / 100 result: 65.33

Posted in InfoPath, SharePoint | Also tagged , 4 Comments

InfoPath/SharePoint/SharePoint Designer: Allow someone to only post once.

This is really a method that can be used to also run rules based on whether a user has submitted something before. Create a single line of text field (Username), make a workflow to set the that field to the username of the person who created the item. Then create a text field (Filter) that you then set its Default … Continue Reading

Posted in InfoPath, SharePoint, SharePoint Designer | Also tagged , , Leave a comment

InfoPath: Run a validation rule on a people picker field (sort of).

You cannot run a validation rule on a people picker field, however this is what you can do to achieve the same effect: You can create a single line text field. Set the default value of the text box to be populated by the people picker field (Display Name, Username (AccountID), or Account Type). Place the text field into your … Continue Reading

Posted in InfoPath, SharePoint | Also tagged , 3 Comments

SharePoint/Infopath: link to a particular view in an InfoPath form in SharePoint by the url.

All you need to do is add &DefaultView=ViewName to the end or the url. Ex: https://sharepoint.edu/site/Lists/ListName/Item/editifs.aspx?ID=1&IsDlg=2&DefaultView=Approval

Posted in InfoPath, SharePoint | Also tagged , 4 Comments

Infopath: Limit the number of words in single line text and/or multiple line of text fields

Add a Validation rule. Under Condition choose The expression from the drop down. Paste in the following expression (replace 60 with the number of words you want to limit it to): string-length(.) – string-length(translate(., ” “,””)) > 60  

Posted in InfoPath, SharePoint | Also tagged , Leave a comment

Infopath Extract Day, Month, or Year in InfoPath from a Date Picker field or Today

In InfoPath, under Fields, Right Click on the single line of text field and choose Field Properties. Under the Default Value section click the “fx” button beside the blank field. To extract the day number of a date, use number(substring(field1, 9, 2)) To extract the month number of a date, use number(substring(field1, 6, 2)) To extract the year number of a date, use number(substring(field1, 1, 4)) where field1 represents a date picker control or the function of today() … Continue Reading

Posted in InfoPath, SharePoint | Also tagged , Leave a comment