Create And Publish Designer Workflows To SharePoint Online From Local Machine (by Priyaranjan K S)

Workflow is a handy tool when we have to automate business processes or implement a logic in response to some events within SharePoint. To accomplish this out of the box, we have SharePoint Designer that helps us to create and publish Workflows to SharePoint. Generally, there are three types of Workflows which are given below.

  • List Workflowis
  • Reusable Workflow
  • Site Workflow

List Workflow is attached to a particular list and the logic will be executed upon that specific list. Thus, if we want to have the same Workflow logic be attached to another list, we will have to recreate the Workflow for the new list. To overcome this issue, we have the reusable Workflow, where we can attach the Workflow to a content type. Hence, any lists that inherits the content type will have the Workflow also attached to it. In this way, we don’t have to recreate similar Workflows for multiple lists. Another type of Workflow is the Site Workflow that is attached to the specific site. Unlike List and Reusable workflows, Site workflows does not get triggered in response to added/modified events. We have to manually trigger the site Workflows.

We are pretty familiar with how to create Designer Workflows for SharePoint On Premise. In this article, we will see how to do the same for SharePoint Online.

What are we going to do?

I have a list named Employee in SharePoint Online that contains the employee details like First Name and Last Name. Now, I want the Full Name to be populated with First Name + Last Name automatically as the user fills in the First and Last Name. We will make use of Designer Workflow to get this done.

Get started

Let’s spin up SharePoint Designer from our local machine, where we will connect to SharePoint Online.

Click Open Site, so as to connect to SharePoint Online site.

Specify SharePoint Online site URL in the site name field and click Open.

This will open up SharePoint Online Authentication page, where we have entered the E-mail Id of the account, which is used to connect to SharePoint Online.

Add the password and click Sign In.

Thus, we have successfully connected to SharePoint Online site.

Create list Workflow

Now, let’s create a list Workflow, which will be attached to a specific list in SharePoint Online site. Select the list to which we have to bind the Workflow.

This will open the Workflow creation dialog, where we will specify the Workflow name, description and the platform type. We can select the platform type as either SharePoint 2010 or SharePoint 2013.

Upon clicking OK, Workflow Designer becomes available. I have added the Update Item Workflow activity, which will be used to concatenate the First Name and Last Name and update the Full Name with that value.

Click Add to set Full Name as the destination field to be updated.

In the ‘To this value:’ field, select the 3 dot button to open up the string builder Window, where we will concatenate first name and last name.

Click Add or Change Lookup to select First Name field from the Current Item.

As soon as First Name has been added to the string builder, do the same for Last Name.

Now, the string builder contains the concatenated string.

Click OK to update the Workflow activity.

Finally, the Workflow will look, as shown below.

Set the triggering condition

The Workflow activity and logic is in place. Now, we have to set the Workflow triggering condition. Click Workflow Settings.

Check the start options. I have selected both items created and item changed event, so that the Workflow triggers on either of these events.

Finally ‘Publish’ the Workflow, which will push the newly created Workflow to SharePoint Online list.

Test the Workflow

Now, let’s test the Workflow by creating a list item. We will add the First Name and Last Name but will keep the Full Name empty, as it should be filled in by the Workflow.

On clicking Save, the item will be created. Initially, the Full Name will be empty but let’s do a page refresh to see if the Workflow has been started.

The Workflow has completed, as stated by the Workflow Field, ‘Create Employee Full Name’. The Full Name has also been populated.

Clicking on the ‘Completed’ Status will take us to the detailed Workflow status page, where we can see the Workflow run time and other details.

Summary

Thus, we saw how to create and publish a Designer Workflow to SharePoint Online from our local machine.

Bir Cevap Yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

TOP