Send a Form Link via Workflow - Mel Balsamo

InfoPath Dev

This Blog


Mel Balsamo

Send a Form Link via Workflow


How about approving workflow requests via email with one click?

With Qdabra's easy-to-install FormsViewer app, you can do this and more.

Wouldn't it make even more sense to approve workflows from a phone without having to login to SharePoint?

Well, now with FormsViewer, even external users can approve requests. One click. No log in required.

Faster, better, easier - that's FormsViewer!

Important: please don't attempt this while driving.


You are a site collection admin.

Your site has the FormsViewer App installed, or your SharePoint admin can install it.

You have an InfoPath form or access to InfoPath Designer to create one.

Sample Scenario = Leave Requests

A Leave Request form is a common scenario where approvals are required.


Employee requests personal time off (PTO)

  1. Employee navigates to HR site

  2. Employee clicks on Submit Leave Request

  3. Employee fills out form and submits

Manager is notified

  1. Manager receives an email summarizing the PTO request

  2. Manager clicks on link to approve or reject request


To implement, you will need the following:

  • One Leave Request form (InfoPath)

  • One Manage Leave Request form (InfoPath)

  • One SharePoint 2010/2013 workflow

Note: You can download and install our Leave Request solution from the Qdabra web store here:



To approve or reject a request with one click, you need to tell the form whether you are "approving" or "rejecting" when you click. So, there are two links. One link has "&Approval=Approved" and the other has "&Approval=Rejected".

To create these links and send an email we will use SharePoint Designer…

Here's the workflow:


Here's the email:


Here's the link for "Approved":



To create a link for rejecting, you just change the "&Approval=Approved" to "&Approval=Rejected".

Now, let's take a look at the form.

Qdabra's Leave Requests solution has a form for submitting requests (Leave Requests form) and a form for managing the leave requests. Both are included in the package.

The workflow that sends emails with the approve-reject links is associated with the former Leave Requests form.

But, the links themselves point to the latter Manage Leave Requests form.

The Manage Leave Requests form opens when the manager clicks the link and there is logic after form load that sets the approval status based on the command that was passed.

Here's how the form canvas looks like in InfoPath Designer:


Here are the rules that get the approval status:


Notice that we are using the qRules command "GetInputParameter" to query the link for the Approval key. This key indicates whether the manager has "approved" or "rejected" the request.

After obtaining the approval status, we next need to get the ID of the form:


Once again, we are using the qRules GetInputParameter command to query the form's ID from the link.

After getting the link, we can query the form:


Notice that the rule queries the form from the Leave Requests library - that is where it was submitted.

Next, the form updates the library based on the approval.


That's all there is to it.

Just create a workflow link that appends the form's ID and the Approval command. Then, in the form use qRules GetInputParameter to query these values from the link and perform some actions based on what they are.

To do this even if the user is not logged in, just add one more parameter:


Of course, you'll want to look at the samples. :)


No Comments
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.