SharePoint 2013 list actions capture values like links, calendar dates, and strings. Here, Gini Courter shows how to add calendar events to a workflow.
The next group of actions that we're going to look at are list actions. And when we talk about lists we mean lists like an announcements list or a links list, but we also mean document libraries. Like this library or our articles library. All of these are lists in Sharepoint. And, what we're going to do is create a small workflow to illustrate how we create a new list item, and so here's the setup. When someone adds a new event to our calendar here.
In the HR area, where we're going to track our training's our orientations and so on. We want to give our staff the ability to easily create an announcement to promote that event. Now we're not going to make this automatic. We're not going to run it so that every single new event gets created as an announcement because that's probably overkill. A user can subscribe to see the events calendar in Outlook. And they can put alert on the announcements list, but if they're doing both, that's just too much.
But I want to give all of our users the ability to easily say, this event deserves an announcement. So, easy enough to do Let's go then to HR events because that's where this is going to fire. Go to Calendar. We don't normally approach this, this way but it works just fine. Workflow Settings > Create a workflow in SharePoint Designer. And remember that we're going to get asked three times whether this is OK. And now we'll add a new workflow to the list.
And, let's call this, Create Announcement From Calendar Item. I add that from calendar item mostly because when I look at the list of workflows available, it's helpful for me to know that it's related to the calendar. And again, I can enter a description. And one of the most important things is that this is a manual workflow that allows the user to quickly create an announcement about a calendar item.
To SharePoint 2013 workflow, so we're going to say OK. And our first action, that we want to take is to go up to the list actions, and say that we would like to create a list item. So create item in this list and the list we want to choose here is where we would like to place this new item and that's in the announcements list. So it says OK. That announcement is going to need a title. What should we use for the title of the item we are going to create? So there's our value.
I can double click and say set the title in the announcement to. And remember that our current item is going to be in the calendar and probably it would be really great if we simply used The title here as well. But I could throw a little text in front of this, so the title would be something like, Orientation Session, or Staff Meeting. And I could add some text in front of that. It says new whatever, just added to the calendar, for example.
So the title in the announcement field is going to have this value. Now we can have other items here if we wish. We could add other fields. We could grab other items out of the body, and we can use a, a builder for this as you saw me do a minute ago. So I could create a pretty bulky announcement here, and that would be a good thing to do. So there is my title. And let's say that we want to add then to the body and the value then will open our builder and we'll put on.
And in the current item in the calender, we'll go grab the start date. And we might want to do a long date here. This event will be held on such a such a date in. And then will grab the location for the current item. There's are location and string. And that's what will go in the body. So, the title will be New Item Added to the Calendar. And the body will say, this event will be held, and we could determine whether it's an event or whether it's an appointment or a meeting, but that works.
This is just a real simple example of creating a new item. Now you might wonder when you're looking for title, body, and so on. You know start time, end time, how do I know what those are called? Well they're basically called the same thing in the calendar that they're called in Outlook. That's true for our calendar, that's true for our context list and our task list. So if you already know what all of those things already are, that's just going to be great. And there's one more thing that I could do that would be sort of sweet. If I go back into this item, I could add a link right back to that item in the calendar.
So, I'm going to say here's a link, and whenever we want to add a link to something, we use our encoded absolute URL. So this event will be held at this date and time in this location, here's a link. It's going to help our users jump right on that. So we'll say OK. OK. You created a new list item, OK. Now, what else? We'll change our stage name just' because it's a good thing to do. And remember that we need to be able to say how we're going to get out of here. So, we're going to go to a stage, and the stage will be the end of the workflow.
Very simple workflow. Let's check it for errors. All good. Let's save it, and then we're going to publish it. Now were working in an editor or what's called a text base designer in this version of SharePoint Designer. Because we also have a designer that we can use that is not text base that is the visual designer. I'm really in the editor now, I'm going to go back to Create Announcement From Calendar Item which is actually showing me my settings. And this is a really good habit to be in, because if I want to make sure that I'm starting a workflow automatically when an item is created, it reminds me to do that.
If I want to make sure that I'm using the tasks, task list and the Workflow History, history list. I can do that here, as well. So, this is good. I can publish this again. I've made a couple of changes. And, it's good to do that. And, again, changing these is something you want to do before you start using this Workflow. .And this is gong to be manual, so, let's go test this and see how it works. We're going to go to our Calendar and, this is again, our Calendar in our HR site, which is called HR Events.
And, we're going to put a new training on April 17th. So we're going to add a new item. And this will be in the board room. And it will be held form 11 A.M. 'til noon. We could put some more text in here. Don't necessarily need to, but we could categorize this. It's for business. We could specify our own value, we might like orientation actually. It's not all day it's not a repeating event, so I can save this.
Now this is really done nothing so far. I can go take a look at this particular item. And I can say workflows, create an announcement from the calendar item. So I'm just going to go ahead and kick that off. And it's done. Now, why isn't there anything here? Because it won't be here, it will be in our announcements list. So here it is. This was the announcement that was just created. Remember I said new and I had a place for it. And happens to be a new employee orientation that looks like I'm stuttering there.
So there's a new, new employee orientation that was just added to the calendar. This event will be help on Thursday April 17, 2014 in broad room here's a link... Looks good. It's all here. So that's how easy it was to be able to create a workflow that created an announcement for the calendar item. Nobody had to enter the same information or copy and paste it. We just took that information out of the calendar item and plugged it right into. The new announcement. That's how you create a new list item in a SharePoint workflow.
- Automating workflows
- Documenting workflows with Sticky Notes, Excel, and Visio
- Driving workflow interactions with forms
- Using workflow actions
- Making choices and controlling flow with conditions
- Creating a simple form
- Using email notifications
- Pausing and stopping workflows with core actions
- Building a dictionary
- Creating a site workflow
- Deploying workflows
- Creating workflows visually
Skill Level Intermediate
Q: In the video "Creating a workflow with conditions," the email workflow generates the email and successfully changes the value in AreaCalc but the workflow does not complete, and raises no errors. How can I fix this?
<div id="pastingspan1">A: There are different workflow configurations for SharePoint 2013; some use the Workflow Manager 1.0, which does not appropriately handle changes to Boolean (Yes/No) columns in workflows. The fix is to change any columns with the Yes/No data type used as workflow triggers to the Number data type.</div> <div> </div> <div id="pastingspan1">FIX:</div> <div> </div> <div id="pastingspan1">1. Modify the data type of the AreaCalc, HRCalc, and FinanceCalc columns (which currently use the Yes/No data type) to Number.</div> <div> </div> <div id="pastingspan1">2. Set the default value of each Calc column to 0.</div> <div> </div> <div id="pastingspan1">3. Modify the calculations of these columns using an IF function to assign 0 to No (False) and 1 to Yes (True). For AreaCalc, the formula would be: =IF(ISBLANK(Area Approval),0,1)</div> <div> </div> <div id="pastingspan1">4. In the Wait For Field Change in Current Item workflow actions, modify the conditions in the workflow to trigger based value of the Calc field changing to 1, for example, AreaCalc = 1.</div> <div> </div> <div id="pastingspan1">After making these changes, test your workflow again.</div> <div> </div> <div id="pastingspan1">NOTES:</div> <div> </div> <div id="pastingspan1">You could choose any number values you wish, however, using 0 for False and 1 for True are standard and therefor make your workflow a bit easier to understand.</div> <div> </div> <div id="pastingspan1">If you experienced the described behavior in your workflow, you may wish to avoid using the True/False data type while you're designing custom lists for your organization.</div> <div></div>
Q: Where do I get InfoPath Designer 2013 (mentioned in the "What you need to know" video)?
<div>A: InfoPath Designer 2013 is not currently available as a free download from Microsoft, and it has never been sold as a standalone product. You have two options for obtaining InfoPath: </div><ol><li>If you have Office 2013 Pro, you may already have InfoPath Designer 2013, but it may not have been installed. Try reinstalling Office and choose to install InfoPath Designer. </li><li>Sign up for a free 30-day trial of one of the Office 365 plans that include InfoPath Designer—for example, Office 365 Enterprise (E3) Edition, which also includes SharePoint, or Office 365 ProPlus, which does not include SharePoint. After the 30-day trial you will need to pay a monthly fee for Office 365. </li></ol><div> </div>