The less time it takes to fill out your forms, the more time your users can spend on other tasks. Also, odds go up that form fillers will complete forms when they take less time to fill out. This blog post will give you a few tips for speeding up form filling and improving accuracy so your forms are completed faster.
In this post we will cover
For questions where one answer is much more common than others, it can be useful to set up default starting values. The value you choose will appear when the form is opened, but the form filler is still able to change it.
You can set default values by selecting the control and clicking on the properties pane, and then choosing “Default Value”.
Let’s say I had a sailboat rental form, and when boats are rented employees need to fill out who checked out the boat, when it was checked out, what type of boat it was, the boat #, and customer information.
Because the sailboat rental place has mostly 24 foot boats, we can set the default Size to be 24 feet. Now employees won’t have to fill this field out most of the time. To set a default value, select the control (the boat size dropdown), choose the Properties tab, and select Default Value. Type the default value in the box provided. You can set the defaults for text boxes, combo boxes, check boxes and many other controls this way.
When a boat is being checked out, we need to log the person who checked it out and the date. Most commonly, boats are checked out for today’s date. We want to set the default value of “checked out by” date to be today’s date.
To set the checked out date to today, select the date control, go to the properties tab, and choose “default value”. Choose the function builder at the right .
Choose the “Insert Function” button and pick the now() function from the Date and Time Category. Click “OK” until you return to the form. Now, when users open the form today’s date will be automatically filled in. When using today() or now(), the form will update the date when you re-open it unless you uncheck the “Refresh value when formula is recalculated”. Make sure to uncheck this box.
today() and now() can both be used to set the default value of a date picker. However, the type of form you have can affect which one you use.
- Use today() when you have a date-only field.
- Use now() when your field requires a date and time.
In general, when using a SharePoint list form, use now(). When using a form library or filler-only form, use today(), unless you have changed the data format of the date field to date and time.
Setting the default value of the Person/Group picker is done through the fields task pane. Show the fields task pane by selecting “Show Fields” on the data tab and expand your Person/Group picker field (in my case, outBy). Click “Show advanced view” to see the detailed view. Right-click on the AccountId and choose properties.
Under default value, choose the function builder and type userName(). Again, make sure that “Refresh value when formula is recalculated” is unchecked, so that this rule is only run once and not every time the form is opened. Click Ok.
Repeat this process with the DisplayName (optional) to get the best experience. Now the people picker will default to the person who opens the form. When we load the form, the date, boat type, and checked out by fields are already filled out. With half of the fields completed, it will take employees less time to check out boats.
Hopefully, these tips will help you set good defaults and your users will spend less time filling out forms!
I am building a template form in InfoPath that will be used by several team members. I want to be able to have a unique number (next number in sequential order every time a new form is brought up from the template). I assume there should be some sort of macro to accomplish this task
. Can anyone help me with this. I am quite a neophyte at this stuff.
good article, one questions.
I have a provblem when I like to set up value with more than one user in people peqeker control, do you test it in this situation?
thank in advance
Hi Kate, thanks for the article. There remains one question regarding the default user:
When deploying the form to Sharepoint and using userName(), only the actual username (e.g. "everitt") is filled. Even though the people picker shows "Kate Everitt" the fields themselves are still filled with "everitt". Only when you choose the user manually (e.g. by entering "everitt" and clicking on the checkmark), the correct "myDomain\everitt" is filled, as well as the AccountType.
With your proposed solution the AccountId = "everitt" and DisplayName = "everitt" - but NOT myDomain\everitt.
Kate, Thanks for this post. While by no means are we pros at developing IP2010 forms, the fact that "SWITCH VIEW" does not seem to work as expected just prior to submitting a form via e-mail, means that we need to add a lot of code to get around that. In fact so much so, that our forms are noticeably slow in completing them. Fixing the "SWITCH VIEW" would be HUGE!
How come you can't just type the function into the Default Value?
If I use the fx button and pick today() it works. If I just type in today() I get: The value is not valid for this field's data type. ...
So it does not realize I am entering a function. The text is not underlined as it is when you push the fx button. In RS, the = sign is used to make it an expression. I think InfoPath needs something similar.
Thanks a lot.
Quick way to learn this
http://www.fewlines4biju.com (A Sharepoint and Personal blogging and Tutorial Web Site)
MCTS MOSS 2007
Great post! Shows how easy InfoPath 2010 is :)
Hi I think EasyDrop Online Drag And Drop Form Filling Tool is the best tool
I am creating one infopath form having field Phone No.and Department so whenever end user opens that form a underline will show infront of these two field rather than textbox,how we can do this by inbuilt rules .
Very useful for me!!
Thank you very much.
Congratulations, your blog is appealing and informative. Going through your Information, I found quite a few new ideas to implement.
In regard to Dennis's comment; you would need to setup a secondary data source, to retrieve data from the userinformationlist of the sharepoint site. Then have it fetch the AccountID, etc..., and setup a form load rule to set username() to the AccountID from the secondary data source.