Description:
Here I created Leave application, where if required leaves is less than or equal to 1 means its "Automatically Approve", else its needs "Manager Approval".
In SharePoint 2010, first we need to create a custom list in my server(http://demo:500)
Here Select More Options, then
Here first select the Custom List, name it as "Leave Application" and click the create button,
Here, it will create a Custom List and default Title column and rename the title column to S.No.
Here, to click the Create Column for creating site columns.
Here, create site columns Employee Name as Single line of text, Department as Choice are HR, ESD, Finance, StartDate as a Date filed, EndDate as a Date field and Required Leaves as number field.
Here, Our Leave Application List is look like as below
Now Here, List creation is completed now Open the SharePoint Designer
Here, select the workflows in that select the List Workflow and named it as Leave Application Status, give description also and click to ok button.
Here, Select the Condition in that select "If any value equals value" condition.
Step 1: Here, Take one If condition and set the parameters as Current Item:Required Leaves, operator is not equals to 1
Step 3: Here, select the Wait for field in change in current Item and set the status as Pending.
Step 4: Here, take one more if condition and set the parameters as Current Item : Approval Status equals to select the Approver or Participants, enter title as a mandatory filed, add the participant and click to ok.
Here, to click the Create Column for creating site columns.
Here, create site columns Employee Name as Single line of text, Department as Choice are HR, ESD, Finance, StartDate as a Date filed, EndDate as a Date field and Required Leaves as number field.
Here, Our Leave Application List is look like as below
Now Here, List creation is completed now Open the SharePoint Designer
Here, select the workflows in that select the List Workflow and named it as Leave Application Status, give description also and click to ok button.
Here, Select the Condition in that select "If any value equals value" condition.
Step 1: Here, Take one If condition and set the parameters as Current Item:Required Leaves, operator is not equals to 1
Step 2: Here, In Action ribbon select "Start Approval process" and set the Approved.
Step 3: Here, select the Wait for field in change in current Item and set the status as Pending.
Step 4: Here, take one more if condition and set the parameters as Current Item : Approval Status equals to select the Approver or Participants, enter title as a mandatory filed, add the participant and click to ok.
Step 5: Here, If the Required Leaves are below 1 means automatically approved, that purpose in else block take the Set content approval status for this Document set to "Approved" with "Automatically Approved".
Here, finally workflow look like as below
Now finally save and publish. Now go to the SharePoint server Leave Application List add new item to the list.
Now enter the appropriate values and click to save button.
Now Select the workflows
Now Start the Leave Application Status
Now click the Start button to start the workflow.
Here, workflow is started that why the workflow status it shows In Progress.
Here, Login to the Adam Barr, In that Task List it contain the details of the workflow.
Here, to enter the comments and click the Approve button.
Here, we can see the output of the workflow.
Here, the required leaves are below 1 means automatically Leave Application Status it shows "Completed".
No comments:
Post a Comment