Skip to main content
Nintex Community Menu Bar

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,

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. 


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/1Site Collection Name]/Management/User SmartObject that will return a user ID given the account (domain/account).


@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


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.


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.


Reply