InfoPath

InfoPath

Some useful tips for using InfoPath.

Promoting People Picker fields

Promoting the People Picker field does not work as immediately expected within SharePoint.   When you promote the Account ID or Display Name field the resulting SharePoint column is typically left blank.

The easiest way to promote the username is to create a new Account ID (or Display Name) field in your InfoPath form and then populate this field from the People Picker.   You can then promote this field from InfoPath.



1. Add a Text Box field under your People Picker field (you will delete this field from your page later).

2. Label this field as ApplicantAccountID



3. As you can only apply formatting rules to the people picker field, you will not be able to create a rule to update your ApplicantAccountID field.  You can however set the default value for your ApplicantAccountID field to the Account ID of your people picker field.

4. Select Text Box Properties.


 
5. Click the FX button in the Default Value > Value field.


 
6. Select Insert Field or Group


 
7. Choose either AccountId or Display Name.  If you wish to use this field to email users via a workflow then promote the AccountID field.   

8. Click OK

9. Click OK

10. Click OK

11. Remember to delete the new field from your page view



12. To promote your new field select Form Options > Property Promotion > Add


   
13. Click OK

14. Click OK

15. Now you can publish your form and use your newly promoted field.

Read more

Access user Active Directory details via the User Profile Service in an InfoPath form.

Forms should make life easy for users. Anything you can do to help the user complete the form faster will improve the usability and acceptance of your project.

Users expect that they should not have to fill in their name, email address or phone number to the form, if that information is already stored in Active Directory. We can easily get these details by accessing the User Profile Service via a Data Connection in InfoPath.

Here’s how to access the User Profile Service in an on-premise hosted SharePoint environment.

Note: If you are using Office365 or Microsoft's SharePoint Online you are out of luck when it comes to this one!   This feature has been disabled by Microsoft as a security precaution.  

Click on Data Connections


Select Add


Choose Receive Data


Select SOAP Web Service


Paste In your URL to your site home page and append _vti_bin/UserProfileService.asmx?WSDL


Choose GetUserProfileByName


Click Next.


Click Next


Click Finish

Job Done.

Read more

Sending email from InfoPath, closing the form, and avoiding "The form has been closed" message

Recently I worked on a form for the Logistics Team.  The manager wanted an email sent every time an order passed the “Waiting for Allocation” status.

Typically I piggy back on a SharePoint Designer workflow to send my form emails.  You have complete control over the content of SharePoint Designer generated emails and that is usually the most important requirement.

The manager was not too worried about the content of the email, in this instance, and there was no other reason to create a workflow, so I opted for the Submit to Email method within InfoPath itself.

When using the Submit to Email method you can either Send only the active view of the form and no attachment or Send the form as an attachment.




Send the form as an attachment requires InfoPath form filler to be installed on each user’s computer, which I could not guarantee.  A more important reason to avoid this method is that I would break the user-convention I want to establish with the site.  Allowing users to interact with the form sometimes on the intranet  and sometimes in their inbox will lead to doubt and confusion in user’s minds.  

Nothing affects user-adoption in the early stages of a project more than doubt and confusion.

Send only the active view of the form and no attachment was the only option.   

Easy I thought.  I will set up an Email View with the six required fields, switch views, send email, close form.  Job Done.  

On the Submit button

  1. I added a switch view rule to go to the Email View
  2. sent the email
  3. switched back to the current view
  4. closed the form.


Everything worked except for the Close This Form rule.  The form would display the “The form has been closed” message without closing the form, and returning the user to the Document Library.

After a short investigation I felt this was most likely a bug in InfoPath. Rather than troubleshoot the bug I decided to change tack. 

I created a new EmailSection with my required fields.  I created a ShowEmailSection field to control when the EmailSection was visible, and added formatting rules to all of my sections displaying or hiding them after the Submit button was pressed.

I updated my Submit button rules.  

  1. I changed the value of the ShowEmailSection field (this triggered the formatting rules displaying the EmailSection and hiding my other sections)
  2. Sent the email
  3. Switched the ShowEmailSection field back to default
  4. Closed the form.

My Submit Button Rules


This method sent my ShowEmailSection fields in the email, and closed the form without showing the The form has been closed message.

Job done!

Read more

Future of InfoPath - 2015

It seems InfoPath is around for a while yet.


Microsoft were hoping to retire InfoPath in the near future, but this decision has been rescinded.  Here is an excerpt from their updated blog post.


“As part of the update shared around the Evolution of SharePoint and the next SharePoint Server on-premises release, we are also updating the timelines for removal of InfoPath Forms Services components of SharePoint and SharePoint Online. Specifically, InfoPath Forms Services will be included in the next on-premises release of SharePoint Server 2016, as well as being fully supported in Office 365 until further notice. Customers will be able to confidently migrate to SharePoint Server 2016 knowing that their InfoPath forms will continue to work in their on-premises environments, as well as in Office 365.

The InfoPath 2013 application remains the last version to be released and will work with SharePoint Server 2016.”


There are also rumours of a Migration Tool, though nothing formal has been announced from Microsoft.   InfoPath will be formally supported until 2023 for on-premise installations, which is plenty of time to plan for any migrations. 

 

 

Read more
×

Log in