Abstract
Microsoft has announced that InfoPath 2013 will be the last version of the product, but it is still supported in Office 365 and looks to be available in the upcoming SharePoint 2019. While it is an older technology, the combination of InfoPath forms and SharePoint Designer workflows is still a powerful combination. In a later chapter, we show how to build forms with PowerApps. These will get additional capabilities and will likely eventually replace InfoPath. This example comes for a request for a way for the cadet squadrons at the Air Force Academy to route approvals through the appropriate chain of command. Before we created this solution, documents and approvals were emailed from person to person, with no good way to check the status to see where it might be stuck.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
See “What’s coming with SharePoint Server 2019 on-premises” at www.techtask.com/whats-coming-sharepoint-server-2019-premises.
- 2.
Squadrons are broken into flights and elements. So a cadet who needs approval to travel to a family wedding, for example, might select the B2 approval, which goes to the B2 element leader, the B flight commander, the cadet squadron commander, and then the air officer commanding.
- 3.
This was a reasonable upper limit in our usage, but you could pick a higher or lower number.
- 4.
We have found in practice that the squadrons prefer to leave the form open and NOT have the approval locked down for only the named user. This is because cadets might be travelling on an away trip for a sports team or club. Rather than holding up the process, the deputy or a designee will approve instead and put a note in Approver’s Notes to that effect.
- 5.
Note that only the first approver is required. The workflow logic will figure out how to know when the final approver (2–8) has been reached.
- 6.
We sort by Title and check the box to Automatically retrieve data when the form is opened so that drop-down list is ready to go right when the user opens the form.
- 7.
The controls with a dotted line around them are calculated controls. I use those so that the user is not tempted to type in them. Instead, they are loaded programmatically as we will see shortly.
- 8.
The userName() function is very handy. As we will see later, I commonly have a custom SharePoint list with the authorized users for a particular section of the form listed in the Person column. One thing to watch is that you will need to change the column to display the Account rather than the default Name (with presence) if you will be comparing their values to the userName() function.
- 9.
Getting the proper email address out of the user name requires the use of some functions to strip out the unneeded parts. Here is how it looks for an Office 365 account: concat(“mailTo:”, substring-after(username(), “i:0#.f|membership|”), “?subject=”, RequestSubject). This allows the user to easily launch their email client to send an email the form creator with questions or instructions.
- 10.
I will often use a date time stamp as part of the title. But if you do this, don’t use the now() or today() functions as part of the form title, as that will make your title change, giving you multiple copies of the same form. Instead, use these functions to set the default value of a field and use that field value in the title. Then the title won’t change unless the user manually changes the date (if it is on the form and not hidden).
- 11.
I typically use one workflow and run it both when the item is added and when it is modified. This means that you need to take into account both cases when creating your logic.
- 12.
InfoPath uses Boolean fields where the values can be true or false. SharePoint itself and SharePoint Designer goes with Yes/No where the values can be Yes or No. These are interchangeable.
- 13.
We use the Level2AccountId and similar fields from the InfoPath form (see Figure 130) for this purpose. If Level2AccountId is blank, then we set hasLevel2Approver to No.
- 14.
Notice how both InfoPath and Designer like to put in spaces to make fields and variables more readable. That’s why the “To” email shows Level 2 Account Id.
- 15.
Note that you can copy and paste these actions.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2019 Jeffrey M. Rhodes
About this chapter
Cite this chapter
Rhodes, J.M. (2019). Creating a Routing System Using InfoPath and Designer Workflows. In: Creating Business Applications with Office 365. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-5331-1_19
Download citation
DOI: https://doi.org/10.1007/978-1-4842-5331-1_19
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-5330-4
Online ISBN: 978-1-4842-5331-1
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)