How to obtain user information with a SharePoint Designer 2013 Workflow.

Laura Rogers

In this episode, Laura Rogers how to obtain user information via a SharePoint Designer 2013 workflow.

[00:00:02] Hello and welcome everyone. I am Laura Rogers Microsoft MVP and this is SharePoint Power Hour. This is a weekly show where I demo things in SharePoint and Office 365 that you can do with pretty much out of the box functionality. I’m not a programmer. I do have a background as a server admin. You’ll every now and then you’ll let me you know see me doing things in server settings and things like that but I don’t know code so everything I do in SharePoint building custom custom business solutions is done with all the out of the box functionality is much out of the box functionality as I can in there and I do a ton of forms and workflows in just my day to day SharePoint work the other day I spoke at the Atlanta user group meeting and that was a lot of fun. [54.3]

[00:00:56] So hi everybody who might be watching for the first time that I met at the Atlanta user group meeting. [5.2]

[00:01:01] I drove over there on Monday and you know somebody asked me what’s a Microsoft MVP and you know I kind of forget and they don’t realise that sometimes when you say Microsoft MVP people think that you actually work for Microsoft. I don’t work for Microsoft Microsoft MVP. Are those rewards that Microsoft gives to those of us in the community so all Microsoft groupies are not Microsoft employees and it’s just it’s an award where they let you know that they appreciate your community contributions and so so that’s what it is. I’m not a Microsoft employee. I have my own company. It’s called IWMenter and I it’s a SharePoint training company. So I. Today’s demo I’m going to talk about SharePoint designer 2013 workflows and how to get user information in them. This is a fun one because. And back in SharePoint 2010 workflows you might have noticed that they actually had some actions in there and the ability to go dig into user profile information and use that in your SharePoint 2010 workflow. Get the users manager is getting information about the user and it was a source in the workflow that you could utilise as part of the workflow in SharePoint 2013 workflows. Those actions don’t exist anymore so that’s kind of one of the big negatives is that you don’t have those user information actions. Well if a couple of months ago I did a power hour kind of talking about how powerful the call web service action is in SharePoint designer. [1:46.0]

[00:02:48] So what I’ve done today is I’m going to show you how you can tap into the user information using that web service call in a SharePoint designer 2013 workflow and a 2010 workflow. It’s it’s in there already you don’t. There is an action called Get manager there’s a data source called user information. You don’t need to do anything special but 2013 workflows you do. So you guys looking forward to this. Looking I’m glad to see you all in the chat window. If you are new to this were it I hope you mentor dot slack dot com and in the description for this video there is a. If you’ve never joined it there’s a form to fill out to be able to join in and join into the chat with us. So hi everybody. And the good thing about me doing these live demos is that you know we can have a conversation and you guys can ask me questions live and we can kind of work things out together. You never know what’s going to happen with a live demo. Right. All right. So go ahead and get started. I’ll share my screen and talk about some of these concepts. So let’s get SharePoint designer crack that open. So I’ve what I’ve done is I’ve got a little bit. We’ll see if I can zoom in. I don’t think I can zoom into that any further. But I’ve got a workflow that I kind of started putting together. [1:27.1]

[00:04:16] That just it kind of bare-bones gives us a way to look at what’s going on inside of the user information list and put a link in the general channel there to a reference that I used that where it basically is somebody showing how to get see this user information list. So he’s basically just pointing out how to get to that and how to query things in it. So when I get delve into the user information list and if I just spit out just you know do a web service call just to this user information list I’ll kind of I’ll show you kind of what it spits out. It’s a bunch of Jason. So we talked about Jason the other day when we were talking when I kind of introduced this concept and it it basically it’s got all the information about all the users and groups and everything. [59.8]

[00:05:16] This is the user information list in your site. This is not the user profile service so one to get that straight upfront that this is not the user profile service this is the user information list. From that site. But it does have all the information about the users that is contained in that list. So it’s got you know now talk about the fields and a little bit but it’s also it’s got users in groups and some nice little fields that we can utilise in our workflows to be able to you know obtain a little bit more insight about somebody that is involved in the workflow whether it’s the person running it or the person that something is being routed to or somebody in a people field so we can get information about those people. [47.1]

[00:06:04] So when you query the user information list it’s going to spit out just that big blob of Jason code that I showed you. But what you can do is you can do this little extra filter. [13.2]

[00:06:17] Let me see if I can zoom in here. [2.4]

[00:06:23] Fire Whoa. [4.1]

[00:06:30] That is intense. OK. We go over here. [2.5]

[00:06:34] You can see that OK. [4.6]

[00:06:39] So you can do a filter and this is in that blog post that I referenced you can do a filter that returns just people because you know there’s a whole other thing we could tap into there with groups and doing things of groups and that’s really powerful too. So what I really want to show you in here is kind of if you’re advanced enough of some of the directions you can go when you start digging into this and things that you can obtain and hopefully you can get creative with some of the things that you can find. So what I’ve done here is I’ve got a I started just testing this on a very simple list where I have a people pick her that’s got a person’s name in it. The people pick her is called V-P. So I wanted to just get information about that one user who is in that V-P people field. So I obtained user username as one of the fields and the user information list and I’m able to get see if it equals the V-P and basically returns one record. So it’s going to go find the one username in the user information list that equals that V-P that person and it’s going to give me all detailed information about them now I could do different things like say and department equals and then type a department name in or pick a department feel value from some field in the list and then return a whole bunch of people. [1:32.9]

[00:08:12] So I don’t have to just query one person I can just you know say you know department equals something or office equals something or you know again think about all the fields that you have available. Let me zoom back out here we go to get the of that magnifier thing. [23.7]

[00:08:36] OK. So that’s what we’re going to do. So this test that I ran returns a little bit of information about just the one person. So first of all just doing this query me show you what this looks like. So username I put username equals and I chose the current items V-P. And this is a people field called V-P. And I’ll just flip over and show you that real quick. [23.4]

[00:09:02] People feel called PC you can kind of see what I’m basing this on. So here people feel called V-P. [8.3]

[00:09:11] So that’s what that’s the list that I’m looking at in this is that this is the list that the workflows running on. So it’s going out carrying the user information list and finding the one user you know for whatever item this is running on where the VIP equals that person’s name. So here’s what it returns and I’ll show you a little. So this is a very specific subset of information. So I it returns one record because there’s one user that has that e-mail address so that’s where my e-mail addresses are going to be unique right. That’s a great way to get that unique value. [37.5]

[00:09:50] You know Carlist I haven’t talked about the Microsoft staff that’s brand new that just kind of rolled out. I need to try that out. But that’s a good way to remember to try and do your power hour about that. [11.8]

[00:10:02] Thanks. [0.5]

[00:10:05] All right. So you follow me so far this is all information about one person. So if you went into that there’s a hidden list in your SharePoint site called the user information list. So if you went into that list these are some of the fields that you would see in there. Again it’s not everything from the user profile service. All right so I’ve got work e-mail and I’ve got username. Looks like work e-mail and username are the same thing. So me seeing user name in here is how I knew to go use that in my query where I’m going to say username equals. And then the person in the people feel basically. So I’ve got I can get their phone number I can get there. About me information I can get their office if I have one of those I can get their picture. This is your picture from the user profile service. I’ll show you something fun that I did with that. And then you know again just use their information. Their manager is in here as well so they can get their manager and be able to tap into that and use that in my workflow. [1:09.2]

[00:11:15] So what am I going to do with that. So I go and get that information about the person and then what I can do is get all the results I can count and see how many items I’m getting. This is a lot of us count stuff I use is just for testing so I can see what’s going on when I’m doing this and then I’m going to take the results. So the word that I’m typing here. And for these results is the word that I saw in all that code that I was looking at. So I’m just I just saw the word department I saw the word picture. I can do. I’m just going to copy and paste this and I can do manager. [38.2]

[00:11:54] I don’t have a manager. We can go look at you know Kermit query maybe some users that might have a manager value and then I need to spit that out to a different variable maybe call it BP manager string. [16.1]

[00:12:10] Now this one so what I’m doing is again this was all just kind of testing at some logging this information so go copy this paste this and I’m going to log this other one. So I’m really all I’m doing here is getting a few fields d results. Thing is I’m getting grabbing some information from inside of that J-Son results thing. And just logging some of those specific pieces of information. OK. So then what I started testing here is this ability to you know what I could do in an email. So I was trying to test something fun I was trying to make it so that it spits out the person’s picture. So it’s going to query and get that person’s information and then I want to put the person’s picture in an email. So what I did and I’m going to I’m going to go ahead and just delete this and start from scratch. We’ll go ahead and law this information and I’ll just say Go to end of workflow. We’re just going to basically just log a bunch of information and go ahead and just run the workflow on one of these test items. [1:14.7]

[00:13:33] Do you do you while I’m publishing my workflow What do you guys think. [4.7]

[00:13:40] Thank. Thanks Carlos. That’s a that’s good to know. Yeah. I was kind of a saw a blog post about that came out in the past day or two. OK. So the work the list that I’m running this on is just my approver look up field just because it’s a list that I have. That’s you know got to people field in it that I thought I would just try that out to point to it. So what I’m going to do is I think I’ve got to use your end here. Well let me leave that one alone let me try one that’s got think I’ve got a user called Billy-Bob in here and I’m going to run that one on that user so this this workload just really just looking at that BP field. So I have this just so I can manually run the workflow just because I’ve been testing it a bunch so I can go to workflows and just run just manually run and test user information. [1:01.0]

[00:14:43] Are you guys excited this is some fun nerdy stuff OK. [3.2]

[00:14:49] You guys had the need you guys give me some feedback in the chat window. Have you guys had the need to do stuff like this. Has it been a big gap for you where you can’t do it in 2013 workflows anymore. So let me go ahead and click on this workflow and see how it’s doing. OK it ran all right so it counted one item. It didn’t. Whatever this logging was it didn’t put anything I think that was the manager one. [27.2]

[00:15:17] And then it logged the department and then it logged the person. Let’s see OK. [9.0]

[00:15:26] So it’s logging some information that it’s spitting out. [3.5]

[00:15:30] We see back to here department. OK. [7.6]

[00:15:41] So didn’t log the picture in it but it did log the manager. So the person doesn’t have a picture in their profile but they do have a manager. Let me go see so their manager is. And so this is good to know. This is why we do logging so that we can see exactly what it’s going to spit out what is the value of that manager feel. So this is they have no picture. This is I-T and the value of the Manage your field. So when we’re using the manager field in the future to do something or query something well we’ll know that this is the syntax and remember. So back and we’re looking at the user information list and specific information about one user. You can see that account here. See this account field. This is the same syntax as what it was spitting out for the manager name. [1:00.4]

[00:16:42] So something else I can do in my workflow would be to go call the web service again where where the account is basically this the manager. And then I can go get all the detailed information about the person’s manager if I wanted to. So again think about that I’m not going to go like through step by step or maybe I’ll write a blog post about this but I’m not going to go through step by step about how to do every single thing in this demo but hopefully you guys I’m showing you enough that you can kind of see what’s behind the scenes here and you can play around especially using some of the syntax in that guy’s blog post that I shared with you that me I should shout out to who that was let me see here we go. [45.7]

[00:17:30] This is Bogden Tangan. So this is the blog post that I was using to just see what the syntax is of some filters that you can do. So this is how you get the person. [15.6]

[00:17:46] This is how you can get do multiple filters like I did where I said Content type equals person and username equals whoever the V.P. is. So he goes into several different kind of ways that you can do this and how you can even sort things etc.. [14.9]

[00:18:03] Close that OK. [1.8]

[00:18:07] All right so the next thing I’m going to do is show you some fun stuff that I can do with that e-mail and how you can actually make it show the user’s picture. OK I’ll do an e-mail action and e-mail these users and see who I’m going to send it to. I’ll just send it to you. I’ll just make it go to me because I created this item and the subject in I’ll put VIP info and I’ll just put the pretty name of the V.P.. [37.6]

[00:18:45] So this is again a people field so I can just put their display name nice and pretty here. [5.4]

[00:18:52] OK. [0.3]

[00:18:52] And then I can put its departments and put the person’s department so remember that’s a variable I call the variable VIP department and I can put manager if there is a manager. It would tell me who that is in SharePoint 2010 workflows. If there was I’ve tried to do something with the manager field and there was no manager or the the whole workflow would actually error out. So this is actually good that it will just spit out a blank if it if there’s no manager. So I got department manager and then watch what am I to do with the picture. So I can’t put a picture in here just in the regular editor for an email. But I can go to these won’t see you can’t really see me scroll down a little. I can go to the advanced properties for this e-mail action and you guys seen this before. So went to the advanced properties and this is where I can actually directly edit the HD out of my email. [1:07.8]

[00:20:04] Good tip Carol in the results section you should always put in the Jason label for what you want to pull out. Whatever happened what happens if you don’t put like department after slash results. Yeah. When you’re typing in there you have to put you have to go find that exact what the value is. So you have to kind of look at the results that are getting spit out and go look at what that what the exact property names are. [33.9]

[00:20:43] Edwards says whereas the relationship between workflows and flow is flow the new workflows are that we complement each other going forward. There isn’t really a relationship between them. They flow is sort of the new way that Microsoft’s doing it. There’s no further development on SharePoint designer workflows but there are still a ton of things that you can do and SharePoint designer workflows that you can’t do in flow yet but there are also some cool new things you can do and flow that you couldn’t that you haven’t ever been able to do in SharePoint designer workflows for example go across sites and across webs and across services. So I and I hold it I did a whole other SharePoint power hour are all about flow too and we actually had somebody from the flow product team from Microsoft there in the chat window answering questions and a lot of fun. [50.1]

[00:21:34] They will kind of compliment each other so you know technically you can do things in SharePoint it’s really just a matter of what’s you know what’s your trigger if my trigger is an item getting created in SharePoint I can have that trigger a flow but I could also have that trigger a SharePoint design or workflow. But right now it’s kind of in flux so there you can’t do everything and flow that you can do in your own designer so it’s going to be like a gradual thing where you know when you find things that you can transition that are maybe simpler or maybe have the functionality and flow that you can’t do in designer then that’s what you’re going to start go in that direction. [41.5]

[00:22:18] All right watch this so I can so got. This is the HVM owl of my email so I can see that I’ve got. Manager and again I’m not a programmer I’m just kind of looking at this just you know figuring it out and what I can do is put an image in here. [19.9]

[00:22:38] So we put like a line break here and then do. And don’t put spaces or page breaks or line breaks in here we do this I N G or C equals. [10.0]

[00:22:49] And then I have that workflow variable where I pull the person’s picture and I did this just by trial and tribulation earlier right like 20 minutes before power hour I have to use this you are out. If I return field as and just return it as a string it’s going to come back with the whole the whole string that’s got basically this whole thing in one big blob which is really the you are all in there twice. So I really just made the URL So when you’re dealing with hyperlinks in SharePoint there are always two parts to them. There’s the description. There’s actually the hyperlink and then the description. In this case the hyperlink and description are the exact same value but those are the two parts to your view or else so I just need the you are l and so that’s when to return it as if I don’t return as you are out. It’s not going to show is a picture in this email. [57.6]

[00:23:47] So return as URL and I can do even do something fun and do like put quotes around it all as equals and maybe put the person’s name to BP display name. [14.5]

[00:24:05] All right so that’s image. I am yes or see quotes around it got quotes around that. Looks like it’ll work. And then after you’ve done this though and put your image in your workflow. Email don’t go back into the regular editor and try and do stuff because it will break whatever you did in HCM owl. [21.6]

[00:24:27] So just tip of the day. [1.4]

[00:24:32] Thanks Julian. I’m glad you like that. That’s a fun one. [3.6]

[00:24:36] I think I wrote a blog post about doing email and workflows in images I’m not sure yes so that’s how you can tap into a person’s picture and I just literally figure that out like half an hour ago right before I was starting power hour never actually done it in the real world. Now of course if your users don’t haven’t put a profile picture there and X or etc it’s not going to show anything. OK so let’s go back to you know I just made myself learn it right because I knew I was about to do power hour and I needed to just figure the stuff out. OK so now I’m going to go just back up to my little test list I have here and I’m going to pick once I know I have a profile picture and I’m going to pick one that’s got me as the V.P. so I’ll go ahead and just run that workflow on that one so noticed that in this list just kind of a little tip is as we created this approver look up list which I do a lot in business solutions I create so that you can have look up information about routing things to people maybe depending on what department they’re in and things like that you could make it instead of having people have to fill out this department field. [1:23.9]

[00:26:01] You can make the workflow run as soon as you create this approver look up the item and go get the department and then put it in the department field field for you. So this is just something that I had just typed in there at some point when I created this. But it’s going to keep that in mind. So this is the one that I just ran it on Scusi I think I got an e-mail here it is. And look at that department I.T. manager it I don’t have a manager remember. And then I just put a line break and then I put my picture cool aha nerd Gulf that OK. That’s how you do that. So yeah just keep in mind that when people are receiving e-mails with pictures on them and I did write a blog post about this I think because somebody commenting on the other day about you know when you’re in outlook and you open up an e-mail that’s got pictures in it but it’s from a sender that you haven’t trusted yet. [1:07.6]

[00:27:08] So while the pictures show kind of like with little red X’s on him and it says trust the sender or whatever so that it will render the pictures well and users are going to come across that when you’re kind of depending on where the pictures are that you’re putting in your email apparently I didn’t have that issue. My pictures just in my user profile. [19.2]

[00:27:28] So it was fine but just kind of keep that in mind that’s one of the comments that somebody made on my blog the other day about that that they didn’t like the fact that it had all the little red X is on it. [12.4]

[00:27:43] Hey thanks guys. [3.7]

[00:27:48] All right. So that’s one thing that you can do with this so let’s think about a way that I can create and have an actual form that someone’s filling out. And I’m just going to make this up as I go along have a form that someone’s filling out for just some kind of request form that needs to get approved by somebody. So we’ll go ahead and see how much of this we can get built. [25.2]

[00:28:14] But it’s I’m going to go look at this little maintenance request list that is just again just think of Brainstorm different types of requests that you could have in your company and it’s just got two fields and it’s it’s not there’s nothing to it. I’m actually going to take info path off of this thing so I think this is something I created a while back. That actually surprised me because I’m not used to using info path anymore I don’t usually put that on lists anymore. All right so now I’m going to have to see. There we go. You like that that’s actually kind of new. So if it’s a if it’s a boolean if it’s a yes no field in share in a regular SharePoint custom list and you’re using just this new modern look it’s automatically showing it as a toggle field. All right. [53.5]

[00:29:09] So I’m going to build a workflow on my maintenance request list. So we’ll go. I’m actually going to leave this open so I can toggle back and forth to it so I can copy some of this stuff and I’ll go to workflows and do a new one on my maintenance request and we just refresh this for fun. And again remember this is only the user information list from the the people that have ever either been to this site the site collection or their name is used somewhere in a people picker in the site collection. So I’m not going to be able to just go queery out of everybody in the organization. [41.5]

[00:29:52] So that’s kind of important you’re not going to be able to have like a brand new user that’s maybe never gone to this site and have it find them or do something with them. [9.8]

[00:30:03] We’re see new maintenance and I think I’ve actually got some other test workflow on the same list so what I mean to do is go over to my maintenance request list and just really quick look OK looks like I don’t have any so that’s good. [21.3]

[00:30:25] All right. OK. New maintenance. So what I’m going to do is to build a dictionary and a copy and paste it over the pan but thing about this building dictionary thing is it doesn’t paste it over. It doesn’t paste the dictionary the array the information in it. So I have to go manually type it. [19.8]

[00:30:45] So what I do is I usually just go copy this part which is the complicated part. And again I wrote a blog post about it’s called looping through tasks. If you just go to wonder Laura com and look for do a search for loop you don’t have like this part this syntax in there. So that’s why I’m not kind of going over what’s in that. [18.6]

[00:31:04] So I’ve got except. And then Content-Type. [5.5]

[00:31:13] And those are just the standard two things that I always type in here. All right. And then I can actually copy a few of these. You don’t have to do the count results thing but a lot of the time I use that for trouble shooting. [13.2]

[00:31:27] So I’m actually just going to copy a whole bunch of these copy and paste. [8.9]

[00:31:37] Now it is going to be a little bit confused because I have a couple of references that were to that list that I was in. So that might be why it’s not pasting over there. Yeah maybe maybe I shouldn’t try so many at once. See I’ll just do this one and try that. There you go. OK see this. OK so what is my new query going to be. [26.7]

[00:32:04] When someone fills out a maintenance request What do you guys give me some ideas you guys give me some feedback in the chat window about what kind of typical things that your maintenance requires. [11.1]

[00:32:15] There is a little bit of a delay so I’m just going to start going. But typical things that you might want to happen or information you might want to happen when someone fills out just some kind of request. So what I do is I’m going to filter to go find a person and I’m going to say Manager equals Let’s see no username equals then I’m going to say let’s see it want to get the manager of the current user. So many get the current user. So whoever is filling out the requests current item created by and then I’m going to go get their log in name so user name equals. No it was actually email address so how do I know this because username over here in this syntax. See that’s an email address right. So I’m going to go find that user that one record for the person filling out the request and to go get that user information. But then from within that user information that’s when they go figure out who their manager is because maybe I want their manager to get. That’s pretty typical right. The manager should get that e-mail. [1:31.4]

[00:33:48] So I’ll go ahead and go back and copy something else. None of this stuff really has any references to the specific list I was in so I should just be able to move this out of the way it should just be able to pace this. Look at that. So did a lot of work a lot of work I did previously so it’s just referencing and variables and stuff like that. So I noticed that when I pasted from this other workflow it just created all the work all the variables for me. Nice right. So it’s not going to be V-P though so I might want to rename those and make them called something else. So [37.1]

[00:34:25] you guys are saying who’s reporting it where where it is a condition and certain amount of time has passed. You guys are getting fancy. All right. I love doing workflows on the fly. Ok [11.8]

[00:34:37] so I’m going to get the manager is really what I need from this one and I’m in a call it’s going to get there department that’s useful I need that but then I’m going to get their manager to call this get variables. [18.3]

[00:34:58] I want this to run when a new item is created and we go back in here and I want to go ahead and get that apartment and I’m just going to put their departments in a field in this list. Fancy right. Sue Gurlitz settings and I’ve actually got there’s already an existing out of the box site column called department. [27.3]

[00:35:26] I’ll just add that so I’m going to make it get that information about the user and then get their manager in their department and then fill that in. And then I even got their picture and I can maybe put their picture in the email that goes to the manager that is so fancy. OK. So that I’m a log some information. [22.5]

[00:35:48] So how do I send an e-mail to who the manager is let’s just try email and I could do like assigning tasks and stuff like that I’m not going to do assigning tasks but we’ll just say workflow variable. [18.3]

[00:36:08] And this is the manager and I didn’t really I didn’t ring this variable that’s the manager basically of the person who filled out the request and then I’m going to say a new maintenance request and I’m going to say just who it’s from. [24.0]

[00:36:33] Created by. There we go. And I can put information about the request. [7.3]

[00:36:43] What were some of these fields. The subject. [4.9]

[00:36:48] I’m just going to put the subject in here. [1.5]

[00:36:52] And you notice that it had a field called Emergency yes or no. I can even do things with some maybe some conditions in the workflow that you know I’m assigning a task I can make the due date sooner whether you know depending on if it’s an emergency or not and I can do all kinds of fun stuff like that. So I’ll just put the subject in here. And when you guys take my four day workflows in forums very advanced class I’d have you mentored dot com I we spend like days doing this like it’s very intensive and it’s a whole bunch of SharePoint designer 2013 workflows trouble shooting like digging in and you know understanding all this stuff in lots of labs so it’s it’s a lot of fun to me I really enjoy this stuff. So here’s the subject of the request and then are requestor and I can put the person’s name I already put it in the subject but I can go ahead and do that here as a display name and then I can remember I can do the fancy thing with the picture properties. And so got requester and I’ve got their name and then I’ll just put a bigger page break this time my workflow variable for their picture as a you are. Thank you so much for posting the link to my site there. [1:39.7]

[00:38:32] That’s nice. [0.7]

[00:38:47] OK. So I’ve got Image Cercy I think I got my syntax right in there. OK so it’s going to send an e-mail to the manager and then it’s going to update the current. Now remember it added that field the new field that has the department added that after I already have this workflow open so went ahead and hit refresh. So this workflow will be able to recognise that I added a new field falsettos says would it be overkill to log a lot of the workflow steps. No especially when you’re first creating your workflow. Put a ton of logging in there and that’s the one of the big things that I teach in my workflow classes log often and put it put a lot of logging in there especially when you’re creating it and troubleshooting it so you’ll see exactly what’s going on. OK so I’m going to send an email and send an email to the manager. [56.3]

[00:39:43] And then I’m going to set field value. [3.3]

[00:39:49] Let’s see if it Funt there’s departments and then I’m going to put the department as the department of that person. All right. And then what are some of the other things that we want to do. Who’d want to send an email to the manager and then we want to potentially the next step after that could be like if we were going through multiple steps of a process would be to go send an e-mail to the V.P. and that’s where that approver look up comes in handy right. So I can send an e-mail to the V-P where the department is equal to whatever this person’s department is. So I’m not going to do that just yet. I’m just going to go ahead and publish this and see what happens. [51.6]

[00:40:41] And here we go. [6.1]

[00:40:48] That’s going to run each time I create a new maintenance request so let’s see what I broke. And let’s see if it works or not. Because I usually have to publish and try again and republish and try some other things and republish. [13.2]

[00:41:02] That’s like the entire story my life so it’s always fun like figuring out what little side things are going to work on while I’m waiting for my workflows to publish. OK so let’s get to the list. Let’s get ready to submit a new main request which should trigger this new workflow. [19.8]

[00:41:23] So what is the subject broken. The lights have gone out. [4.5]

[00:41:30] There we go. Mercy so I can actually hide this department field right so that it’s not something they have to fill out because the workflows going to fill it out for them. You guys already know how to do that though right. You know how to just hide a field real quick. OK so lights have gone out and then we go ahead and refresh this. So it’s getting the variables. Of course I think I just had one big stage in there so let’s go see how it’s progressing along. It started so it’s just running right now. [32.4]

[00:42:04] It’s going to take a few seconds. [1.3]

[00:42:08] That as I was testing this too it was they were pretty slow. [3.4]

[00:42:15] Are you guys trying this all right now you’re going to go home and try this and figure it out. Oh look at that. So it got one it logged my picture my profile picture it did I. But then guess what. I don’t have a manager. So it ran it as me. But I don’t have a manager so it’s not going to have anybody to send it to. So let’s go see if it errors out or what it does. Had to hand them something up right. I had to make it can’t go perfect the first time I try it. So it still says activity in progress. I think it’s probably going to give me some kind of error like there is no you know couldn’t find a person or something like that. It’s definitely going to give me an error. Just how long is it going to take to do that. So what do I need to do. So in the real world what do you want to happen when the person doesn’t have a manager. [56.2]

[00:43:11] Now if your a is set up all perfectly correct then the only person in the whole company that’s not going to have a manager is the CEO. Right. So this should only be happening to one person. If you need help with your active directory and getting organized I highly recommend you guys take a look at hyperphysics dot com. That’s a new company it’s a new product that they can actually help you automate stream streamline and fix your issues. Little tip of the day there. But you’ve got to think of what you want to happen. If somebody doesn’t have a manager. But I’m also going to go ahead and log in as a different user one that does have a manager and go ahead and run the workflow as that person. So let me see. [43.2]

[00:43:55] I’m going to log in as Billy-Bob because Billy Bob’s manager is me and I’m just doing this in another browser window because you know your browsers get all confused when you are trying to log in as different people right. [15.6]

[00:44:11] You guys experience that in a office 365. [2.6]

[00:44:17] OK so Billy Bob doesn’t have a profile picture. I could’ve sworn I put one in there for him at some point. Well so his is going to have the correct part where it actually goes to a manager. [16.8]

[00:44:35] But it’s not going to be able to have a picture in the e-mail so broken window parties that when all go on broken or something like that. [15.4]

[00:44:56] So now we’ve got a couple of different things going on so let’s go see what happened with this other one. I’ll go refresh this and see if it aired out. It just didn’t do anything which is good because you know you don’t want it to. You know all of a sudden air out because it’s because of some information about a user being missing but no manager is going to get an e-mail. See you’re probably going to want to accommodate for that. So what you can do in here is do what an if statement right. If workflow variable manager is empty then I can email the person that sent this I guess say so maintenance your maintenance request was submitted but you have no manager so it didn’t know who to read it to. Or something like that. You sued him saying so and then otherwise. If they do have a manager then do the e-mail or e-mails the manager make sense. Now then it’s setting its departments we can go look and see if that did that correctly and me go ahead and publish that and go look at what happened over here. So lights have gone out. Look at that it put the department in there. Very cool. [1:33.6]

[00:46:30] And then let’s go look at the other one in here that Billy-Bob filled out for me see me do my created by OK. [22.6]

[00:46:53] Yeah Billy-Bob created that one and it filled in his department too. And then let’s go see my office 365 e-mail cool. So it sent me the e-mail. So it looked and saw that I was his manager. And it did send the e-mail telling me the subject and the requester and then it just doesn’t have he doesn’t have a picture so that is another. That is another nerd golf club moment. This has been a lot more successful than last week was kind of painful with power ups and controls and kind of trying to painfully go through figuring some of that out on the fly. [37.7]

[00:47:31] But yeah. [1.2]

[00:47:33] So let’s see I’ve got like 12 minutes left so I’ll show you kind of what. [8.0]

[00:47:41] The way you could do that approver stuff. [1.6]

[00:47:45] The next stage that you could do would be to you could be you know sending an e-mail to the manager but we can also just make it like assign a task. So let me go do that. I’ll move this up. I usually avoid task actions. I don’t know if you guys have heard some of my rants about my issues with task actions in here but what I want to do is I’ll show you how this whole thing could play out with the task action. So for this all back in here the task assigned to start a test process and then the first approver is the manager right. And then the next approver is the BP. Now what if for some reason they have some weird department name in their profile that doesn’t have a V-P in the list with that department name that could happen right. That has happened. So you’d also have to accommodate for that in the workflow and make it say you know basically if there’s no V-P then do something. So I’m going to go ahead and take that. Get that VIP information and just set it as a variable. Before I even do anything else with it so I’ll just do that work for a variable and I’ll just say I’ll just call it requestors Questors Department V-P nice and descriptive too. [1:30.8]

[00:49:16] And here’s the fun part where we go over to the approver approver look up a approver is what I call that list approver look up and get the V-P field where. [16.5]

[00:49:32] So I’ll just go ahead and just get their log in name which V-P do I want to get. I want to get the V-P where the department is equal to this department that I’ve obtained from the person filling out the form that is so much fun. OK. So then I can even log that requestors Department V-P some getting the part that a person’s VPM logging it. So then when I do my task process who am I sending it to I’m sending it to two different variables. Basically I’m doing the person’s manager and just as a stream because it’s already just got the correct value and then the next one I’m doing is the requestors Department V-P as a string and then maintenance requests blah blah blah due dates. That’s a whole other story. And then do I want to send overdue e-mails. Sure every day for five five times. And then like OK. All right so now it’s going to do a test process so let’s go ahead and now one of my issues with the task process is that you can’t really tell or do anything in between the different people that the process is going through. So that’s a whole other power hour though and that’s another one of those things that I go through in that workflows class as we go through like I spend about an hour building out a test process type thing using these tasks where you can see and control kind of what it does between them. [2:09.1]

[00:51:43] And we’ll see what happens with this one. [3.1]

[00:51:48] I think I should go ahead and make it run as Billy Bob. Because Billy Bob has a manager and then that way it will actually have values for all that. So let’s go Billy Bob. Log in as Billy Bob and Billy Bob’s going to fill out another request. [17.9]

[00:52:06] So carpet’s snag tripping. That’s an emergency right. OK. So let’s see. [13.6]

[00:52:21] All right. So if it’s snag people in their emergencies right. OK so he the workflows running I’m going to refresh this again. [13.0]

[00:52:37] See it keeps telling me to set my stupid time zone. [7.4]

[00:52:45] OK there we go. Second tell the workflow. Set the department. I mean just getting there. And then I can go look at what it’s doing. One item Department is I.T. Here’s the manager. [16.1]

[00:53:01] And then V.P. and then the person filling it out. Let’s see where did I log log variable requesters department. [15.0]

[00:53:17] BP said probably should have made my logging a little bit more descriptive too. So let me show you what I mean by that. So instead of log variable V.P. pick I can say picture you know. [15.8]

[00:53:34] And then actually put. So I’m being descriptive some not just directly logging just all these values. [9.5]

[00:53:44] And when the and the logging get spit out I don’t know what any of it is. [4.3]

[00:53:50] So instead I can go. So manager way. What was that one. [8.9]

[00:54:00] Picture Manager deps just going to skip that one. [9.1]

[00:54:10] I really don’t need whatever that was I just need to see the difference between the manager and the VIP users manager. [11.4]

[00:54:29] And then I’ve got see this is where it’s logging the requesters Department V-P. I think that might be the part that didn’t have one but I’m not sure because I’m just logging a variable I’m not describing what it is. [12.9]

[00:54:49] OK. And then there we go as string. [5.8]

[00:54:55] Sure and click OK. And then I’ve got it if manager is empty. Send an e-mail. So let’s go see let’s go make sure that it didn’t send an e-mail saying now it’s assigning me my tasks so that’s good it actually did send me my task to be assigned but I was just the logging wasn’t very descriptive as to what it had actually done. So we’ll go ahead and go take a look at this task and go ahead and approve it. But the next time we run the workflow will be we’ll be able to have more logging world we will be able to tell what’s going on in there better. [32.2]

[00:55:28] So let me go ahead and public loops go ahead and publish that sort of test process and go OK I mean it’s requests and let’s go look at the screen again and it’s going to show me so here’s the task that got assigned to me. [22.0]

[00:55:50] And I can go ahead and approve that and then see if it goes to the next person. [4.9]

[00:56:06] And that’s another one of those negatives to me about that test process is that if I make changes or fixes to the workflow and publish them all those test processes that are currently out there running and waiting for somebody to do something those are still running the old version of the workflow which has caused me many headaches in the past. OK so now I can see let me go and refresh this and see if it’s actually getting assigned to the right person. Look at that. So it assigned it to Billy-Bob And I think that that’s why it confused me because when I go over and look at my list of approvers Billy-Bob is the V-P of the I.T. Department. There you go. So it did it correctly it went ahead and assigned that next task to Billy-Bob. I actually had a customer one time with some processes that I was creating for them where it wasn’t just you know I feel a lot of reform and it goes to my manager then it goes to V-P and then goes to the CEO and then it’s done. At each one of these steps it had to know if the person filling out the form was a VIP. Then it had to skip the part where it goes to your manager because the person’s V.P. anyway. So basically if you started off as a VIP The only approval level you would have would be CEO. So I had a dynamic dynamically within each one of these approval levels. [1:31.5]

[00:57:38] Do all this crazy logic that looked at kind of the role of the current person filling out the request because they they didn’t want the users to have all these redundant things they had to go through for the people that were already kind of higher up in the chain does that make sense. So there’s a lot of fun stuff that you could do tapping into this and being able to use that user information or go ahead and you can see that it worked. It went finished successfully. Let me go and refresh this and the whole workflow completed and it worked fine. Cool. Just another little tip is that my friend Fabian Williams wrote a couple of posts about them. I told you about the user profile service and how the user profile service is not what we’re using We’re just using the user information list. Well when I tried to just tap directly in the user profile service I got the access denied issues and it’s because there’s all this extra stuff that you have to do because you’re tapping into this. It’s not just a listing or SharePoint site. It’s actually a whole other like at the service of your service account stuff. So you have to do all this extra stuff like this cookie X request and blah blah blah extra stuff to be able to tap into either other site collections. Are pro cell phone service and stuff like that. So I went ahead and posted Fabian’s link that has all that complexity that you’d go through and if you want it not just do these user information list and do the user profile service or go across site collections and stuff like that with these web service calls. [1:42.1]

[00:59:22] You are going to use those keys to power a session on in workflows and forms Well I did one it’s me pull that up for you see I actually didn’t do it on workflows. [14.7]

[00:59:37] I did it on that I did a whole play list here of forms product comparisons. So I did a whole one on in text forms here. [15.1]

[00:59:52] I’ll post that in the chat window there but maybe potentially I can do one on their workflows. [9.1]

[01:00:03] Thanks for that. Thanks for the suggestion. So one other I think I got another good suggestion here. Oh yeah. [7.4]

[01:00:10] It was that other new product that Microsoft just came out with the staff. That’s another good one. So I’ll go ahead and wrap this up better here. Thanks everybody for coming this week. That was a lot of fun. I really enjoyed kind of digging in and figuring out your point workflows in and demoing that on the fly. It’s something that I’m much more comfortable in than than power will power ups is brand new. So last week was a little awkward but I’ve been doing SharePoint workflows for like 10 years so it’s a lot more intuitive to me. Next week I’m having my friend Nick Rowley who’s local He’s going to come over and sit here in front of the green screen with me in my basement and do SharePoint power hour. He’s going to talk about that authentication and hybrid stuff and he actually does a lot of community work with the SharePoint community. I think he’s be SharePoint and community dot net. Maybe they recently updated it and it’ll look up but Nick is going to be here next week and it’s going to be a lot of fun we’re to figure out like two people in front of the screen screen and get that figured out. So looking forward to that. And thanks everybody so much for coming. I’m glad that you enjoyed you know learning how to do images in a workflow email if nothing else. Yeah. Thanks a. I guess over and out and I will see you guys next time. Have a good afternoon. [1:33.7]

[1:01:42.4]

Summit Bundle

Get 200+ hours of Microsoft 365 Training for 7$!

Master Office 365, Power Platform & SharePoint & Teams With 200+ Hours Of Training Videos in the Collab365 Academy. This offer is insane and is only available for a limited period.