Skip to main content

How do I represent a sharepoint user type in a K2 workflow?


I have a sharepoint list which contains a column of type Person/group. I want to look up an item in the list, and then assign a task to the user who is saved in the this column.


Can anyone tell me how to retrieve the user so that I can use it to assign a task to?


 Sorry if this is very basic - I'm vey new to K2


 Thanks in advance for any assistance.

I was digging around on the blackmarket site and this should give you exactly what you need - http://k2underground.com/k2/ProjectHome.aspx?ProjectID=8


I have not used it yet but from what I understand this is a SmartObject service that can read sharepoint groups/users.  Read this blog to get instructions on how to deploy it - http://k2distillery.blogspot.com/2007/11/create-custom-blackpearl-smartobject.html (focus on sections 5.3 to 5.6).


Then you will need to create some smartobjects using that service and apparently you can then use them in your destination rules.


If you need more detailed instructions - make a post to that project.


Jason


Hi Jason, thanks for taking the time to reply!


Is this the only way that this can be done? I would have thought this was a pretty common requirement - it seems a bit strange that it isn't handled out of the box?


 I have had a look at the project you mentioned, and it seemed to be more about using Sharepoint groups in destination rules. I won't have a sharepoint group - I just want to be able to retrieve a user from a column in a list, and use that person as the recipient of a task.


 Thanks again for your reply.


 Regards


Richard


Once you've got the list row using one of the wizard events, you can assign the value from the person/group column to a process level data field and then use that data field as a destination.  From what I've seen SharePoint puts extra information in the person/group colum that looks something like this:  "#1;domainuserid".  Use a code event to strip out everything except the userid before you assign it to a field to be used in a destination. 


You might have to set up some destination set rules if the value can be a user or a group.  Let me know if you need that info.


This is a fairly common, and the answer is still SmartObjects.  After enabling a Sharepoint Service Instance for SharePoint, create a smartobject that interacts with this sevice object.  With that in place, the SmartObject can be used within the Destination Rule for the desired activity.


Thanks for replying to me on this - I haven't had a chance to get back here until now - sorry for the delay...

David L
This is how I thought that it would function, however when I try to assign a value from a person/group column to a process level data field, it doesn't seem to populate the process level data field. Can you give me more detail on how you do this, as that sounds like exactly what I want to do. Is there a particular type in the process level fields that I should be trying to assign the value from the person/group column to??

Bob
I really don't understand how smartobjects are used at the moment (I am trying to evaluate this product) - could you give me some more information on what is required to do this? I have had a look at the tutorial videos, and still don't have an understanding of what can be achieved with Smartobjects, and how to use them. Any information on this would be great!

Due to my extremely limited knowledge of K2, I really appreciate any assistance you can offer.

Thanks in advance!


Reply