Skip to main content

Hi
     I have some questions about how to get destination users from SharePoint list. First, if I create a SharePoint list to keep approvers by department It looks like;
      DeptCode] | CUserNameOrGroup]
     HR | somewheresomeone1
     MK | somewheresomeone2
     Note: the >UserNameOrGroup] column has type "User or Group" in SharePoint.


     If I want to select list item by passing department code, getting value from oUserNameOrGroup] column and add it to the destination users' activity, how can I accomplish this?


     Second, if it has more than one user or group of approvers for each department. Could I modify the aUserNameOrGroup] column to allow multiple selections or no modify the list but add new item? Just likes;
     HR | somewheresomeone1, somewheresomeone3
     MK | somewheresomeone2, somewheresomeone4
     -- Or --
     HR | somewheresomeone1
     HR | somewheresomeone3
     MK | somewheresomeone2
     MK | somewheresomeone4
     Both 2 methods supported by K2?


     Someone may ask me why don't you fix the destination users by windows group. Ok it's a good solution but in my environment, users don't have permission to use active directory tools and they familiar with SharePoint, so that's why I have to use SharePoint list.


     I'm a newbie to K2 blackpearl and my English is poor, thank you for someone who try to understand me.

Hi dookie,


what you are after is very achievable.


We have created single list entries for the set of destination users that we require, for example


GroupName                              Participants
(Title column in SP)                   (Multiple Users column in SP)


Group1                                     DOMAINuser1; DOMAINuser2; DOMAINuser3
Group2                                     DOMAINuser4


You can then create a smartobject to return the list entries using the SharePoint ServiceObject. The only slight hitch is that if you try to use the return from SharePoint, it wont work as SharePoint with put "#1DOMAINuser1" so you need to retrieve the list entry in code and perform some formatting on it before you can use it as your destination set. You also need to prefix each user with the security group, by default this is: "K2:" in order for it to correctly work, and also ensure that each user that you define in SP is in that security group.


 It's probably worth reading: http://k2underground.com/files/folders/technical_product_documents/entry20948.aspx too, but the scope of the article does not include users from outside of AD or Roles.


Martin


For the first part of your question I wrote a little lab. Perhaps it helps.


(See attachment)


Hi Anja,


 I went through your lab as i have a similar requirement.


only difference is that i need to fetch multiple approvers from the list to set as destination users.


can you give some pointers on how to achieve this?


Regards,


Ritesh


Reply