Skip to main content
Nintex Community Menu Bar
Solved

Updating a SharePoint List with Approver's User ID

  • March 22, 2016
  • 5 replies
  • 9 views
  • Translate

Forum|alt.badge.img+10

Here is the scenario, when an approver denies or approves a list item, I need to save approver's user ID or Name in a custom field in SharePoint list. SharePoint list has "Modified By " field but when K2 Workflow updates an item, this field has default K2 user and not the actual user ID. So I can not use "Modified By " field and  I need to retain the user ID that last updated the item in a separate field. I am updating list item using "Update List Item" option in K2 Workflow.

 

Thanks,

Best answer by Andrew_Blinco

Hi K2_Beginner

 

As you are probably aware SharePoint stores the data for a Person column as the ID for the person for that Site Collection. So to populate that field you will need to first find the ID for the user on that Site. If you are using SharePoint 2013 there is a Get User method in the SharePoint 2013/[Site Collection Name]/Management/User SmartObject that will return a user ID given the account (domain/account).

View original
Did this topic help you find an answer to your question?

5 replies

Forum|alt.badge.img+5
  • Novice
  • 65 replies
  • March 22, 2016

Hi, you could do this from the form or on the workflow. 

 

First create a custom column in the SharePoint list/library then;

 

1. On the form you could create a text box or add a control which transfers the users name or email when the form is initialized and when the submit button is clicked, you can pass that name into a datafield in the workflow and once it's in the datafield in the workflow you can easily save as part of the "Update List Item" method. 

 

2. Using K2 Studio WF (not sure you can do this in K2 Designer WF), from the context browser save the "Activity Destination User" Display Name or email into the SharePoint custom column. 

Translate

Forum|alt.badge.img+8

Hi K2_Beginner

 

As you are probably aware SharePoint stores the data for a Person column as the ID for the person for that Site Collection. So to populate that field you will need to first find the ID for the user on that Site. If you are using SharePoint 2013 there is a Get User method in the SharePoint 2013/[Site Collection Name]/Management/User SmartObject that will return a user ID given the account (domain/account).

Translate

Forum|alt.badge.img+10
  • Author
  • 100 replies
  • March 23, 2016

@Latte,

I searched for "Activity Destination User" option in context browser, didn't find it. I am using Web-based designer. Under what category, you see this option in K1 Studio?

 

Thanks

Translate

Forum|alt.badge.img+10
  • Author
  • 100 replies
  • March 23, 2016

Thanks Andrew!!

 

Will I create a new Smartobject to call GetUser. When I try to create a new Smartobject, I don't see GetUser under Management. Please see attached.

 

BTW I am not using Smartform but SharePoint form. Also, I am using Web-bsed designer and not the Studio.


Thanks again.

Translate

Forum|alt.badge.img+9
  • 91 replies
  • April 11, 2017

I want to get the username from SharePoint people picker column but SharePoint 2013 returns display name and user ID.  

You have 2 options to get the user name.

1. user the SharePoint 2013 -> site collection -> management -> user smartobjet.

you can pass the user ID you got from SharePoint picker column. 

2. update the service instance and make true for hidden list. you will see user information list.

Create smartobject and use that to get username from the user ID.

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings