Implementing Workflow using InfoPath 2010 and SharePoint designer 2010

Introduction:
After writing Gathering requirements for business automation (workflow) article; where I tried to explain in details how to gather requirements from business users in a way that facilitate sofware implementation process, the previous article was generic and can be applied on any technology platform.

In this article, I will discuss how to convert this requirements into a real implementation utilizing SharePoint Server 2010, Microsoft InfoPath 2010, SharePoint designer 2010, this solution is done with out of the box features available in those applications without the need to write any line of code.

This article needs 75 minutes to fully read, understand and practice.


Technologies and Environment Preparations:
I did my demonstration using the following environment:
    Windows 7 Standard edition (64-bit)
    SharePoint Server 2010 ( you need this to render InfoPath forms on the browser )
    Microsoft InfoPath 2010.
    SharePoint Designer 2010.
    Active directory ( or may be local windows users ) that contains 3 already create user accounts.
    Already configured SMTP server ( required to test your emails, can be ignored if you don’t want to check on emails )


Assumptions:  
   Users who read this should have fairly good knowledge in SharePoint 2010 ( as administrator or end user, not developer), basic knowledge in SharePoint designer 2010 and Microsoft InfoPath 2010 (or 2007).
   I recorded 7 videos and added them before that starting of each section, so you can either read the section or quickly go through the videos.


Plan: 
1.    Prepare the needed components
       1.1   Create Site Collection
       1.2  Activate SharePoint Server Enterprise Site Collection Features.
       1.3  Create the needed users
2.    Build the leave requests SharePoint list
3.    Build InfoPath form
       3.1  Create the needed controls and views
       3.2  Disable enable controls according to current state
      3.3  Validation and submitting the leave request
4.    Build SharePoint designer workflow
       4.1 Building the logic
      4.2 Adding tasks assignment, email notifications and History


Solution: 
As you will see from the plan, I will not go through the business case which is the Leave Request business process as every thing was detailed in the previous blog, so I recommend to spend 5 minutes and go through it before starting the technical implementation.

Back

1. Prepare the needed components
Steps 1.1, 1.2 & 1.3 are illustrated on this video:

1. Prepare the needed components

Back

1.1 Create Site Collection.
- Go to Central Administration  || Application Management || Create site Collection || Fill parameters as shown in the table below || click OK

Title E-Services
URL: EServices
Template Blank Site
Primary Administrator <Any valid administrator user >

image

Back

1.2 Activate SharePoint Server Enterprise Site Collection Features.
- Log in to your newly created site collection || Site Actions || Site Settings || (under Site Collection Administration) Site Collection Features || (Next to SharePoint Server Enterprise Site Collection Features) click Activate
image
Back

1.3 Create the needed users:
As mentioned the in Technologies and Environment preparation section, it is required to have 3 users who are going to play the roles of Employee, Team Leader and Human resources, so now we will add them to E-Services members SharePoint Group
- Log in to you newly created site collection || Site Actions || Site settings || (under Users and Permissions ) people and groups || (Make sure that E-Services Members group is selected under Groups)
image

- Click on New || Fill the parameters as shown in the bellow table || click OK

Users/Groups Your Test Users
Send welcome e-mail to the new users Optionally check ( to test email settings )

image

- Do the same for the 3 users, Employee, Team leader and Human resource.

Back

2. Build the leave requests SharePoint list.
Step 2 is illustrated on this video:

Create the leave request SharePoint List

- (in SharePoint main navigation ) Go to Home || (On Quick launch) Lists || Create || (optionally type Custom in search box) Click on Custom List || (in List Name text box) Type  Leave Requests Container || Click Create.
image

Now we will go to the Title Field in this list and change it “not required” since we will not use it in our case, so let us go…
- Go to (in SharePoint ribbon) List Tab || List Settings || (Under Columns Group ) Click on Title || Check No option under Required that this column contains information ||  Under Default Value type Leave Request. || Click OK
image

Then we will create all the needed columns… let us go!
(On Quick launch) Click Leave Request Container || go to (in list ribbon) List tab || Click on Create Column.
image
Create 6 new columns with the following specifications:

Column Name Type Description Required Default value List of values
From Date and Time First day of the leave request. No Today -
To Date and Time Last day of the leave request. No Today -
Team Leader People and Group This user will be the first approver No - -
Human Resources People and Group This user will be the second approver No - -
Employee Comments Multiple lines of text Reason of the leave request No - -
Team Leader Comments Multiple lines of text Team leader comments No - -
Human Resources comment Multiple lines of text Human resource comments No - -
Action Choice This field will be set in the infopath form and will be sent to workflow as an input of the current action ( business process should not change this field at all ) No Clear it SE, AT, RT, AH, RH
State Choice This field will be controlled by Workflow business process and will be used by infopath to determine the current view ( infopath should not change this field at all ) No Clear it WT, WH, DN

Note the following:
    As you will see later on this tutorial; The only way of communication between InfoPath and SharePoint designer workflow is through list fields, so you must create a field for any value that will be needed in the SharePoint designer, for example we will send and email to Team leader, so I added a fields called Team Leader so I will get his email in SharePoint designer from the Team Leader Column.
    I am using abbreviation for actions; SE is Submitted by employee, AT is Approve by Team Leader, RT is Reject by Team Leader, AH is Approve by Human Resources and RH is Reject by Human Resources.
    I am using abbreviations for States; WT is Waiting Team Leader, WH is Waiting Human Resources and DN is Done (when the workflow is done )
Back
3. Build InfoPath form.
Now, we will build the interface that will be used by users to work on this business process by submitting data, approving & rejecting. please note the following before you start:
    For each activity in workflow discussed in previous article; we need a particular form with a specific set of controls; these controls needs to be shown, hidden, disabled and enabled ( this will be achieved by using Views feature in InfoPath )
    As a result of the previous point, we will always load the proper view according to the current state & – sometimes – current logged in user.
    At any moment, workflow is expecting an action from a specific user, so we should pay attention that the user is accessing the form in the right time.
    (for developers ) If we think in N-Tiers architecture way; InfoPath represents the presentation layer.

Back

3.1 Create the needed controls and views

Step 3.1 s illustrated on this video:

Create the needed controls and views

- (on quick launch) click on Leave Request Container || (in the SharePoint ribbon) List Tab || Customize Forms:
Note: If you are not seeing this option ( Customize forms ) please go to step 1.2 Activate SharePoint Server Enterprise Site Collection Features.
image

This will open InfoPath form for you: (you may need to enter username and password, so use the site collection administrator’s user)
image

This form is the default Edit form on this list, we will use this form as an initial form to customize the coming newly created forms ( Actually we call them Views )

- Remove the following fields from the diagram:

Field Name Why we remove?
Title We don’t need it on this case, we may consider having some default value for this field as we did ( like Leave Request )
Attachment In our case there is no need for attachments, but –for example- if you are working on a sick leave business case; it would be nice to have attachment for users to place there medical reports as attachment.
Action Action will be sent behind the since when Approve & Rejected buttons are clicked
State State will be managed through SharePoint designer workflow so you will not set it from the InfoPath at all.

So your from will look like this:
image

- Go to (on InfoPath ribbon) Page Design Tab || (In Views buttons’ group) New View
image
- Create new 5 views as the following ( for more details review the video on the top of this section ):

View Name Description ( for explanation )
EmployeeView View that will be seen by employee
TeamLeaderView View that will be seen by Team Leader
HumanResouceView View that will be seen by Human Resources
AccessDeniedView View that will be seen by any user who tries to enter the form while he is not suppose to ( i.e. Employee tries to enter the form if the leave is waiting Team Leader action )

Now; you need to start filling the views with controls:
- To Copy all the content from Edit view to all other views; Go to ( in InfoPath ribbon ) Page Design Tab || (under Views Group) Select Edit item (default) view || CTRL+A || CTRL+C
image

- Paste the selected controls into EmployeeView. then add a title for this form “Welcome Employee”, then remove Team Leader Comments & Human Resources comments.

- Now;place the cursor at the bottom of the form, then Go to (in InfoPath ribbon) Home Tab || (under Controls group ) Select Button to add two buttons || right click on the first button || select Button properties || Type Submit on the label field || do the same for the second button and name it Cancel. so you form will look like this:
image

- Do the same for TeamLeaderView and HumanResoucesView (Considering keeping the comments if needed)so that they will look like:
TeamLeaderView:
image

HumanResoucesView:
image

Finally, we will have access denied view which will look like:
image

At this moment; we have all the possible views; now we need to tell Infopath which view to show at the right time.. so the logic will be as the following:

ViewName When to show
Employeeview if State is blank ( in creating new item )
TeamLeaderView if State is WT ( Waiting Team leader actions)
HumanResoucesView if state is WH ( waiting Human Resources actions)
Access denied To manage unauthorized access; if the (State is WT and current User is not the selected Team leader) or ( when State is WH and the current user is not the selected Human resources )

So how we need to implement this.. let us go…
- Go to (In InfoPath ribbon) Data Tab || (under Rules group) Click on Form Load || (on the right side ) Click on New || Action || In Details for: Type ShowEmployeeview|| Set the Condition: as described in the above table (State is Blank), Click on Add || Switch views ||  and set the proper view in the actions ( for more information review the video at the beginning of this section ) So you will have something like the following:
image

- Do the same for the rest of the views ( see the video from more information ) so you will got something like the following:
image

Setting employee, Team leader and human resources views are relatively easy; you man need to watch the video for Access Denied view

Notes:
    AccountId for people picker returns a string on the following format “DomainName\UserName” but UserName() function on the InfoPath build-in functions returns a string on the following format “UserName” so when checking on the current user; you need to compare using like this AccountId == concat(“DomainName\”,UserName()).
    The right way of handling the access denied is using SharePoint SPItem event receivers, so that you need to manage the permissions on the list item through SharePoint object model ( item added & item updated events) but this is out of the scope of this document as everything should be done out of the box without any line of code.
    Selecting Team leader and Human resources by the employee is not common case, most likely you will have those values stored in SQL or Oracle database or may be in some SharePoint list or in Active Directory structure, you can connect to these sources using InfoPath receiver connections and filling them on the Form load rules, but I did not implement this because internet is full of articles talking about this subject. check this example – getting user information and set people selector value for more information about this.
Here! it is good idea to publish the form and test it ( the view should show employee view not the default edit item view )

Back
3.2 Disable enable controls according to current state.

Step 3.2 is illustrated on this video:

Disable Enable controls according to current state

As we may know, and according to the analysis in the previous article, some of the controls should be editable and others should be read only, so this part of this article will discuss how can we achieve that using InfoPath forms.
We have two options to disable/enable controls on the page:
Control properties: there is a property available from some controls ( like text box ) which called read only, so we can use it to make the fields read only
Control Rule – Formatting: We can apply some conditional formatting rule on the control ( disable the control if some condition is applied )
we need to modify the views to achieve the following:

Field Name Employee Team Leader Human Resouces
From Edit Read Only Read Only
To Edit Read Only Read Only
Team Leader Edit Read Only Read Only
Human Resource Edit Read Only Read Only
Employee Comments Edit Read Only Read Only
Team Leader Comments Not visible Edit Read Only
Human Resources Comments Not visible Read Only Edit

- Go TeamLeaderView || Select (One Click on) From Field || (on the right side under the Rules pane) Click on New || Formatting
image

Add the following to the rule:

Details for DisableFromDate
Condition State=”WT”
Disable This Control Checked

So you will have something similar to (this screenshot is for Human Resources view! )
image

- Do the same for the other fields mentioned in the table above ( check the video for more details )

Back

3.3 Validating and submitting the leave request.

Step 3.3 is illustrated on this video:

Validating and submitting the leave request

Now we will move the final step of developing the InfoPath form before going through the SharePoint designer details,

There are two types of validation that can be achieved in InfoPath:
1- Simple Validation: like required, or date should be on specific format …etc., From field in the EmployeeView is a good candidate for such validation
2- Complex validation: this is the validation that depends on some business like the comments of team leader is required only if the decision is rejection.

so let us start by the simple one:
- Go to EmployeeView || right click on From Control || Date Picker Properties || (under Data Tab under validation group) check Cannot be blank.
- Do the same To, Team Leader, Human Resources & Employee Comments ( check video for more details )

Complex validation will be handled on submitting the request so let us learn how to submit the request to the document library…
- Go to EmpolyeeView || one Click on Submit button || Create new Rule:

Details for Submit Employee
Condition -
Actions Set Field; Action = “SE”
Submit Data
Close the form

- Go to EmployeeView || one click on Cancel button || Create new Rule ( this will simply enable the user to close the form )

Details for CancelEmployee
Condition -
Actions Close Form

- Go to TeamLeaderView || one click no Approve button || Create new Rule:

Details for ApproveTeamLeader
Condition -
Actions Set Field; Action=”AT”
Submit Data
Close the form

- Go to TeamLeaderView || one click on Reject button || Create new Rule:

Details for RejectTeamLeader
Condition  
Action Set Field; Action=”RT”
Submit Data
Close the form

- After that, you need to go to the TeamLeaderComments field and add the following validation Rule:

Details for CommentsIsRequiredOnrejection
Condition Action=”RT” and TeamLeaderComments is blank
Screen Tips Comments is required on rejection

- Do the same for the rest of actions ( cancel Team Leader, Approve Human Resource, Reject Human Resource and Cancel Human Resource )

Back

4. Build SharePoint designer workflow

Now, let us move to SharePoint designer workflow to build the business process…
- From start menu || SharePoint designer 2010 || Open Site || Locate your site collection (where you created the Leave Request Container list ) || Click Open || enter username & password if needed.
Back

4.1 Building the logic

Step 4.1 is illustrated on this video:

Building the logic

- On the Site Objects (menu in your left hand side) Click on Lists and Libraries || Click on Leave Request Container || (scroll down little bit ) (Next to Workflows label) Click New:
image

- Fill the Create List WorkflowLeave Requests Container as the following:

Name Leave Request
Description This will handle the business process of the leave request.

- Click on Step 1 and rename it to Employee Submission
- Right click in the empty space under the Employee Submission Step and Click on Step to add a step, call it Team leader approval and do so for Human Resource approval:
image

- Click inside Employee Submission step || (in the ribbon under workflow tab) Conditions ||  click If Current field equals value

image

- ( inside the Employee submission step) click on field  and select Action and click on value and select SE.

- Place the cursor under the newly added condition || (in the ribbon under workflow group) || Actions || set field in the current item:

image

- (inside the employee submission step) click on field and select Status and click on value and select WT ( waiting Team leader approval )

- Place the cursor under the newly added activity|| (in the ribbon under workflow group) || Actions || Wait for Field Change in Current Item:
image

- (inside the Employee Submission step) click on field and select Action and click on equals and change it to not equals, finally; click on value and select SE( this will be triggered once the team leader approve or rejects the leave request) so the final result should look like:
image

- In the next step ( Team lead approval ) add the following ( review the video for the details):
image

- In the next step ( Human Recourse Approval ) add the following:
image

- Click on Save Icon.

Now, we need to tell the Leave Request Container list to start this workflow once a new item is created.. so let us do it…
Go to (on the Site Objects menu) Workflows || right click on Leave Request || Workflow Settings || under the Start Options clear the Allow this workflow to be manually started and check Start workflow automatically when an item is created.
image

- Now publish the workflow by clicking on publish button as described bellow:
image

Now workflow should be deployed on the list and you can test that the workflow at this stage!

Back
4.2 Adding tasks assignment, email notifications and history

Step 4.2 is illustrated on this video:

Adding Tasks assignment, email notifications and history

Workflow logic is 100% done, but workflow means nothing for users unless there is notifications sent on triggers and tasks assigned as well, and some reference reporting system ( history list )

- Go back to the workflow designer || right click on the small space under Set State to WT in the Employee Submission step || select Send an Email.
image

- Then click on the these users, then fill the Define E-mail Message as the following ( review the video for more details )

To: CurrentI Item:Created By ( Click on the book icon next to Text box || Double click on Workflow Lookup for a User || (in field from source)  select Created By || (in the Return field as) select Email Address
CC: -
Subject: Leave Submitted
Body Dear [%Current Item:Created By%]
You have successfully submitted you leave request
Regards
System Administrator

- Add anther Send an Email action to notify Team Leader to approve it, review the video if you want to know how you can send a link to the item through this email

Now we will assign a task for the team leader:
- Place the cursor after the email Send an Email activity and right click and select Assign a To do Item:
image

- Click on to do item then you will got the form that enable you fill the Name and Description of this task type, fill the fields like the following:

Name Leave Request – Approve Team leader
Description This task is for team leader to approve the leave request

- Click on these users || Double click Workflow Lookup a User… || in Field from Source select Team Leader || Return field as: || Login Name

- Again… Click on Publish.

- Do the same for the remaining Steps ( Team leader approval & Human Resource approval )

Now we will add the history ( we may do reporting through XSL or object model later on )
- Place the cursor after the email Assign To do item activity and right click and select Log to History List || click on this message || open the edit box through clicking on the button next to the text box || in this free space; you can dynamically build what ever string you want
image

Back


Conclusion:

  • The story of SharePoint designer workflows & InfoPath forms, can be summarized in the following logic:
    • Remember that the only way of communication is through list fields.
    • You simply submit some values & the action from InfoPath to SharePoint list ( which has the SPD workflow deployed on it)
    • SharePoint workflow change the state ( which is also a field in the list as you have seen) according to implemented logic
    • Then InfoPath form views will be loaded according to this state.
  • InfoPath forms & SharePoint designer workflows is a good option for somebody who doesn’t know how to code, or for some quick projects that doesn’t not need that customization, as you can see; there is still some limitations in the UI or on the pattern that is followed in the process; As you can see; 1 hour was enough to finish a business process that may be fully utilized in a real life  scenarios ; so this is the value of SharePoint out of the box implementation.

About Jamil Haddadin

Sr. SharePoint consultant & Trainer
This entry was posted in SharePoint - How To and tagged , , , , , , . Bookmark the permalink.

76 Responses to Implementing Workflow using InfoPath 2010 and SharePoint designer 2010

  1. hisham says:

    Superb article, anyone who wants to start learning about sharepoint ,workflows ,desinger ,info path this is an excellent article.
    Great Ustaad Jamil

  2. Graham says:

    Absolutely excellent! Thank you so much for your very detailed explanations! Could you possibly provide information as to how I could update a company calendar indicating approved employees leave? Also, any news on the “people picker” option where team leaders and HR persons are automatically identified? Many Thanks!

  3. gab1to says:

    Outstanding article. Excellent tutorial, great for beginners like me.

  4. Lindiwe Maduna says:

    Mine is not a comment but a question, I created the Team leader view and added the Approve, Reject and Cancel buttons. I created all the rules associated with these buttons. When I start the workflow the buttons do not show on the TeamLeader view, would you have an idea what causes this. Please help me.

    • Send me the infopath form on my Email…

      • Denel says:

        I am having the same issue. The approve, reject and cancel buttons do not show up on the team leader view in Sharepoint. I have no way to approve of reject?

      • Roberto Soler says:

        Any revsolve in this issue? I’m going to the same thing. I have to click Edit Item on the top bar to view the buttons, but I’d rather have the top bar removed.

      • I’m having a similar issue. Buttons are not showing up unless I click Edit Item in the top bar which I would rather not have visible. Any resolution?

  5. Daniel Christian says:

    I have spent close to a month trying to custom design InfoPath 2010 forms and implementing them into SharePoint 2010 workflows and haven’t been successful.
    Adding the reject button was my biggest issue and you explained that so well.
    The workflow I am working on is project approval which amazingly is very close to the your leave request workflow lol.

    Your instructions with the valuable videos are worth a million dollars!
    Your instructions are so good that I consider them much much better than the Windows training videos I have been watching.
    Well done Jamil!! and once again Thank you very very much.

    I especially like how you added a little humor to your video. When you were typing the leave request reason as ‘I am not feeling well..’ you said, “I am really not feeling well”. That was hilarious!

    • Thank you for the nice words… It is great that this was helpful for you!

      • Daniel says:

        Hi Jamil,
        I had to re-visit your blog to build yet another workflow using InfoPath forms and SharePoint designer.
        This time I can view the buttons only on the view which is setup as default and not the other views.
        Currently I have 5 different views. I do not want to show the InfoPath commands in the ribbon or toolbar.
        I am using SharePoint 2010 Enterprise with embedded InfoPath form.
        Is there a workaround for this?
        I am using a List.
        Thanks

  6. Daniel Christian says:

    Jamil,
    I am replicating the steps you provided and have three questions.
    1. When I add a new item, I am still seeing the original Default form was first created. I am not seeing the Employee View. What did I miss?
    2. The buttons on each form have to be clicked twice for the form to close. I did make sure that I have the ‘Close this form: No Prompt’ action for the buttons. What did I miss?
    3. How do I hide the top ribbon when a form is being filled? The ‘Submit, Reject, Cancel’ are the only options I want the users to see.

    Thanks in advance.

    • 1. Go to Data || (under Submit form) Submit Options || clear Show the submit button…
      2. When you fill the comments, New info path ribbon for rich text appears; so it seems that the first click is releasing the control from the ribbon; the second one does the submission
      3. Go to Data || (under Submit form) Submit Options || clear Show the submit button…

  7. Daniel Christian says:

    Update.
    I have resolved the Default form and the hiding of the top ribbon issues. I am still looking for the button issue. Any help in this regard is highly appreciated.
    Thanks

  8. rotkej says:

    Excellent post. I am only having problems immediately after task assigned and it is approved all the status changes on the list but the probelm I am facing is that it cannot proceed after this to log, send email to next for notification and workflow remains in progress, how can I close this, I am on fire to amke this work today. Help!!!!!!!!!!!!!!!!!!!!!!!!!!

  9. Maqbool Ahmed Khan Niazi says:

    Thanks for a wonderful blog….JAZAKALLAH

    I need some help about page views, i m unable to confige AccesDenied view to restricts Submitter/other users to view the entry.,i have tried the same,for example Condition of acces deined page “State is WT and and concrat (mydomain, username), it is blocking everyone…any help will be highly appreciated

  10. Srini says:

    Perfect! I learnt a lot in this article and videos

  11. Md. Nur Hossen says:

    Thanks lot. Want one more like this……….Waiting for one more……

  12. Jessica says:

    I follow the steps to create a form library and workflow in the demo. But my workflow only trigger when a leave request is submit(first step) and change the “state” to “WT”. It stop the workflow at rest of steps such as even manager approved the request and change the “action” to “AT”, the work flow does not continue. I tried around but have no solution. this is urgent. Could author or anyone give a clue about this. Why workflow stop after first step. I do include “wait for action not to equal SE” in the end of first step.
    I have to go to workflow task list to manually change status to “complete”, then work flow continue.

  13. Jessica says:

    I figure it out that sharepoint workflow have a delay between steps especially if you have submit the document, it need to wait for document unlocked and released to access to it or change field in the document. You have to go to central admin – timer job status – workflow to set workflow run every 1 minutes instead of default of 5 minutes. This trick caused me to puzzle for a week.

  14. Benjamin says:

    Great article. Based on this, I ended up using two workflows to implement a state-machine kind of logic without using Visual Studio — all in Sharepoint Designer 2010.

  15. Traci says:

    This was by far the BEST tutorial I have seen on using InfoPath & SP Workflows!! Thank you so much!!!

    One question, I have setup my workflow to send an email to a person once the form has been submitted. I would like for that user to be able to click a link in the email to go to the current view of the form (i.e. Team Leader Approval) so they can see the request and approve or deny but I can’t figure out how to make that work. It would be even better if I could just email the form to the user, but I’m worried that will be even more complicated.

  16. veeraj says:

    great work…

  17. Nedim says:

    a perfect article. Sir, please share more. thanks for your efforts.

  18. Javed Nehal says:

    I have executed all the steps & my switchviews & worklfows are working perfect.
    Now I have a question here. I want to restrict views /hide buttons using roles.
    Currently employee can also approve the request. I want Employee should not be able to approve as TL or HR & TL should not be able to approve it as HR.
    I tried a scenario (When it is approved by TL & in WH state) using the following approach.
    Create a new view (Copy of TL view without Approve & Reject button)
    Create a Rule on Form Load where I mentioned that if state =WH & created by (AccountId=concat(“domaon”, userName()) then switch to new view that doesn’t have approve or button. But this is not working.
    Can you please help me out here??

    • MJ Bautista says:

      Hi Javed. When I will create a new form, the default is not employee view. It shows access denied. So I need to change the view same thing with the others. When I tried to submit the employee request, the state did not change in to WT. Please help me with this. You may email me at mjosephbautista@yahoo.com.

  19. rkach says:

    Excellent article. I enjoyed every minute of your videos. thanks…

  20. emad says:

    great job! i would like to thank you for this effort, however i have a question redaging to Reject the request, because the 7th video focus only on Approve the request, could you please give us the steps needed to implement the workflow of rejection on each stage of the workflow.
    regards

  21. Pingback: walk-through of sharepoint Important Link « Sharepoint forum

  22. Andrew Todd says:

    This is a wonderful tutorial! Thank you!
    I am having some issues and am hoping that someone can help me.
    1. How would I remove the Human Resources field and still have functionality? I don’t want users to have to type in the same address for HR every time they submit a request. The request will be going to the same HR staff members every time so I don’t see why this field would be necessary.

    2. As I am testing, every time the “team leader” goes to approve or deny, the form goes to the access denied page. I created the test group as mentioned above and everyone seems to have the right permissions.

    3. For some reason, the “state” never switches to “waiting HR”. It goes from “waiting management” to “complete”. I checked the workflow and it is set up according to the tutorial.

    If anyone can help me with these I would be extremely grateful. Again, thanks for the awesome tutorial!

  23. Raghav says:

    Hi Jamil and other contributors

    my boss asked me to develop a leave request form,
    we use office 365 and we dont have any server as everything is managed by Microsoft.
    my question is how to carry out this task using office 365 , share point designer, infopath.

    can I implement this or do i need some other resources?

    thanks

  24. I do trust all of the ideas you have introduced to your post.

    They are really convincing and can definitely work. Nonetheless, the
    posts are very short for starters. May just you please extend them a bit from subsequent time?

    Thank you for the post.

  25. Hi there, just wanted to tell you, I loved this article.
    It was helpful. Keep on posting!

  26. Praveen Kumar says:

    Iam trying Your Artical
    Implementing Workflow using InfoPath 2010 and SharePoint designer 2010
    Iam giving permissions to Three views.
    Employee View(Add Only Permission)
    TL View(Approved or Rejected Permissions)
    HR View (Approved or Rejected Permissions)

    But Employee View Shows One Error.That is Workflow Status Gives Canceled Instated Of InPrograss.Than iam clicking on Canceled That Shows

    Workflow History

    The following events have occurred in this workflow.

    Date Occurred
    Event Type
    User ID

    Description
    Outcome

    12/4/2012 12:06 PM Error System Account
    The workflow could not update the item, possibly because one or more columns for the item require a different type of information. Access Denied
    12/4/2012 12:06 PM Error System Account
    An error has occurred in LeaveRequest (1).

    Please Find The Above Attachment and Let me know Where Is My mistake.

    Please Help Me …..

    Thank you

    praveen

  27. Syed Azhar Hussain says:

    Excellent article, I must say, this is a very valuable contribution to those who want to learn Sharepoint 2010 workflows, Infopath forms etc.

  28. meriem says:

    MErci Beaucoup vous m’avez trop aider à comprendre les workflows merci une autre fois

  29. Vidhulal says:

    Excellent article. I was looking for something like this. Being a beginner in sharepoint ,this article made my life so easy. Thank you .!

  30. Khim says:

    Jamil you’re such a great resource.
    Keep sharing your insightful knowledge.
    Thanks

  31. santosh singh says:

    I have started studying the Sharepoint recently. Your article was very useful in understanding the WorkFlow and InfoPath forms.
    Thank You Jamil !!

  32. Vaibhav says:

    Excellent article! very helpful for beginners..Thanks!

  33. very useful artical …thank u you jamal

  34. Sacha says:

    You are awesome….exactly what I was looking for :)

  35. proxy sites says:

    Good write-up. I certainly appreciate this site.
    Thanks!

  36. Nandish says:

    Hi Jamil Haddadin,

    Really a very helpful article, however, when i publish the form i don’t see any of the buttons.
    Submit, Reject & Cancel none of them.

    Please help me to resolve this issue.

  37. TrinNY says:

    This is a great article and I am still working my way through your videos. Thank you so much for sharing. Here is what I am trying to do maybe someone can help this is my first attempt at an approval workflow

    I need to create a workflow to assign an InfoPATH 2010 web form to a manager for approval..The manager is not the submitter’s manager so I need the submitter to tell me who approves requests for that unit. My process is – the submitter completes the form submits it to a document library and a workflow runs “collect data from user” “fromCurrentItemCreatedBy” to get the approver’s name, The user selects the approver from people picker and output is to “variable:DivDC” Then I start an Approval process on current item with variable:DivDC. This is all a single workflow step and I am not sure if this is correct.

    So far the workflow initiates and the task is generated, the user receives it in Outlook and is able open the task; pick the approver and complete the task. But then the workflow status shows error occured. When I goto View Workflow reports the report has no data so I am not sure where the problem lies.

  38. A great article indeed Jamil. Thanks so much for sharing this with us. I followed the example and created a Software Request form, with three view. Employee,Approver and Denied. Two states WA and DN. I created rules to switch views as per the article. If State ‘is not blank’ then Employee view, if State ‘is WA’ then Approver view and the concat conditions for Rejected View.
    Employee view loads. But upon saving the form and changing the State to ‘WA’, switching to standard view and then clicking the item, Approver view ‘does not’ open. It still opens the employee view.
    Can you or someone who got this to work tell me what is wrong and what step I missed?
    Thanks,
    Swetha

  39. Avinash Reddy says:

    Hi Jamil,

    Great information it was a life saver for me!! Thanks a ton and please keep posting such information which really helps a lot of us out here !!

  40. Uzo says:

    Hello Jamil,

    What a nice article. Nice one. Whenever I activate the access denied view and I publish to Sharepoint, After filling a new form and I try accessing the form with the account ID it was assigned to it displays the access denied page.

    Also when I publish the workflow, after filling a form the teamleader doesnt get any email. The email he gets is for Task assigned to him. When he clicks on edit, it throws error.

  41. Mike says:

    Good day,
    Thanks for posting this solution, it was very helpful. However, i was hoping if you can help me out with one more step further. I want the basic information displayed on a calendar list.
    Can you please advise.
    Mike

  42. Keela says:

    Hi Jamil. This is a great tutorial thanks for sharing! I have a question I hope you can help me with. When the task is created is there a way to close/complete the task when the form is approved?

  43. Andrea says:

    Jamil thanks for the tutorial. I was wondering what the answer was with regard to not being able to see the buttons within SharePoint on the form. I created several views. On a request submission view, the submit and cancel buttons are visible in SharePoint but on the successive views the buttons are not visible (unless I select Edit Item in the ribbon). I have looked at all views and I don’t see any formatting etc differences between the submission view and the others which would explain why the buttons would not be visible. Any assistance is appreciated.

  44. Rawane says:

    hi i have worked throught the videos and create the list, the infopath form and the sharepoint design form, but still some gaps, i wish you could help to solve them because the leave request is a very interresting issue that we all can benefit from.
    1- when Action is AH, the state stays WH and the workflow in progress till i enter the workflow and edit to complete
    2- Human resources doesnt receive the email notification only the team leader does.
    3- if the Access denied view is enable, and when the action is AT, when we click on the item to give the HR approval it gives us access denied page.
    4- when the team leader access the item to give his approve or rejection he should click on the “edit item” to edit the form and not by default.

    thank you for your help in advance

    • MJ Bautista says:

      Hi Rawane. We have the same problem. The Access Denied view is the default and I also encountered that Edit Item is also the default instead of Employee Views, et al. I hope this would be going to be addressed to us.

  45. Sukhver says:

    Great article and video’s but i have a problem in the Workflow. created a 6 step workflow and without any errors, but when i run it does not proceed to other step’s. any idea where i could go wrong on this please ? step 1 is working fine but when the HR approves then should go to step 2 in which the Manager will approve but that does not happen. Please help…

  46. ghousepasha says:

    Great tutorial for those who want to learn sharepoint, but i have a question here how you can give permissions to users like employee, Team lead, hr. Since employee should not have permissions to see Teamleader’s view and hr’s view. Also Teamleader should not have permissions to view HR’s View. After i follow your steps, employee can able to edit Teamleader view and HR view but it should not happend there should be some permissions.So how can i achive these permissions

  47. Arun says:

    Hi,

    Nice article…thank you for sharing valuable information about Info path with SPD workflows.

  48. asritha says:

    Hi Jamil, thank you for posting excellent videos. It helped to learn the workflows and implement similar kind of scenario at work. I have a question in handling the rejection scenario. If Team Lead rejects the leave approval then employee would be notified about rejection and employee should be able to edit the form. Also When HR rejects the leave request then employee should be notified of rejection and employee should be able to update the information. Now when employee resubmits the request HR should be notified and HR should be able to approve or reject the leave request. Here we will be bypassing Team lead since has approved initial request and when employee resubmits the request then only HR will be notified. Could you please help me in handling this scenario. Any help will be appreciated.

  49. Aditi Das says:

    Thank you! This article help me a lot for my project.I have some issue that i have requirement to attach files by employee and the manager can able to open that attachment only.But in manager view when i added attachment control,there manager able to the attached file by employee.So please help me how to make that attachment read only and cant be deleted by Manager.

  50. Aditi Das says:

    Hi,
    I have created same one using this article.But now problem is how to create a solution(.wsp) file of this project and deploy it in my production server.

    Please Help.

  51. Pingback: infopath devlopment for beginners | Sharepoint

  52. Komal Chawda says:

    Hello Jamil,

    This has been of the greatest work ,simple and easy but for some reasons i do not know why my send email option is not working the way it is for you.

    could you give me some inputs on this.

    Best regards,
    Komal

    • First of all u need to check on out going email on ur sharepiint farm and test it (register for alert in any list)
      Then u need to make sure that “work email” property is set to the right email for the user who is expecting to recieve an email.

      • Komal Chawda says:

        Yes i did the same it was kind of working yesterday but unfortunately it does not work today. The moment i added the task assigned to do list, the workflow has been stopped, I am assuming that i am doing something which is not letting the workflow work.

        The first sendemail to the created by person is working but when i see the team leader it does not intimate anything to the leader mailbox. any inputs?

        Best regards,
        Komal

  53. Aditi Das says:

    Hi,

    I have created the similar in sharepoint 2010.But now i want to create this in sharepoint 2013.I have added the list template and created the 2013 workflow with the above steps.But the workflow jump to last step after employee submit.

    Please help how to do this using 2013 workflow.

  54. Matt says:

    Hi Jamil,
    Thank you so much for this! What a life saver.

    For anyone else wondering – this does work on SharePoint Form Libraries as well as lists. (Using SharePoint 2010 and InfoPath 2010).

    However, if you create the form in InfoPath and set the choice values for the State and Action fields then promote them to the Library – they do not seem to show up, at least not in my dev instance. You have to go into the Library Settings tab in the library ribbon in SharePoint then click on the columns and set the values that way. This problem had stumped me for a while.

    Hope this helps someone.

    Regards,

    Matt

  55. john says:

    My only issue is that when trying to view an item as team leader when the state is WT, it always shows the Access Denied view instead of the team leader view. The employee also gets access denied, but that is to be expected. I’m assuming something in the logic that’s comparing the account ID to the current user isn’t working. It would be nice if there were a way to see what it’s actually outputting as “userName()” and AccountID so I can tell what’s off.

  56. Rajat Sharma says:

    It’s really very helpful and have depth knowledge of Info-path forms and workflow…

    I would say thanks again to you for creating a such a good article

    Thanks
    Dharmendra Kumar

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s