.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Fill person/group column with workflow

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :SharePoint
Hi all, I would like to retrieve the 'Department' value of the creator of a list-item. Therefore I created a column named 'Department' of type person/group, show field 'department' From a worflow created with SharePoint Designer, when a item is added to the list, I fill the column 'Department' with the field 'created by'. The result is that the column 'Department' nicely displays the Department of the creator of the added item. When I do the same for a library, the column Department don't get filled, and the workflow keeps the state 'Started'. Any idea what I'm doing wrong? Kind regards. #Update When I add a new document te the library, the column 'Department' stay's empty and the workflow keeps the status 'Starting' But when I save a new document, open it again, edit it and save it again, the column 'Department' shows the department of the creator !!

View Complete Post

More Related Resource Links

SharePoint 2007 to Access 2007 - Issues grouping by "Person or Group" field type/column

We are on SharePoint 2007 and using Access 2007.  The SharePoint list contains a column called Assigned Person, column type: Person or Group, single selection, displaying only the name 1) When we Open with Access and Export a copy of the data, then create a report from that table, we do not have the option to group on Assigned Person.  2) When we Open with Access and Link to data on the SharePoint site, then create a report from that list, when we group by Assigned Person... The same person has 2 groups - there are is no other grouping or sorts on the list, and i can't locate a correlation to another field to show why they would have to collections for the same person The Person or Group column sorts "from smallest to largest" as though it is a number field. The list is a task/activity tracking system we created custom for our needs.  We want to pull a weekly report, grouped by Assigned Person, but cannot get access to work.  We do not want to resort to anything more complex, as it takes a much longer process to have reports pulled by Chrystal or one of those types of applications.  And we cannot change out the field for something like a Choice column as the list already has a very large amount of content.  Can anyone assist? Is there a setting hiding somewhere that is causing the problem? 

Custom user selection in Person or Group type column as per other list.

I have two list in the Sahrepoint Foundation 2010 site. 1) Projects with Title and members(Person or Group - multiple selection) 2) Tasks (Team site default)  - added lookup column Projects form the first list (required) Now I want to assign task given users in the projects list. ex. I have users A,B,C,D,E and Two Project P1 and P2 I have defined that P1 project has users A,B,C so task is distributed/assigned between this members, not to D and E I need some validation or lookup which restrict selection or D and E.   Thank you.  

DataView Person or Group Column Not Showing


Hello all,

I am puzzled at what is going on here.

I have a Person or Group type (Presence: picture with name) column called 'Person'. I added a DataView into sharepoint designer and could not see the picture of person but instead name of person.

Using this article [http://vspug.com/joed/2008/03/17/displaying-users-with-presence-in-xslt-data-view/] I changed the following (disable-output-escaping="yes")

<td class="ms-vb">
    <xsl:value-of select="@Person" disable-output-escaping="yes"  />

However, I still can't see any pictures?

Can you please guide me if I am missing something here.

Thanks in advance.

How to assign values to workflow task person or group custom field?

Using visual studio 2008, in createTask_MethodInvoking, I have the following code. RequestFields has the values from the InfoPath form. ApprovingPersons is a person or group field, added to the task list by my custom task content type. I checked the task list associated with the workflow and I see the custom field.

SPUser user;
SPFieldUserValueCollection fuvc = new SPFieldUserValueCollection();
foreach (Contact person in RequestFields.Persons)
      user = workflowProperties.Web.EnsureUser(person.LoginName);
      fuvc.Add(new SPFieldUserValue(workflowProperties.Web, user.ID, user.Name));

// this is the line causing problem, I believe
PreApprovalTask_TaskProperties.ExtendedProperties["ApprovingPersons"] = fuvc;

I got the following error message:

at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] argument



Moss 2007 Person Or Group Column Hidden From Others

Hello everyone,

I recently added a new SharePoint list that contains 3 columns that
are calssified "Person or Group" column. I have made entries into
these column but the problem is that whenever someone else tried to
view these columns, they can't. As in when i am logged in, I can see
the columns in the datasheet view just fine but when another user logs
in a tries to view the same list in datasheet view, these three
columns get hidden. Any ideas why?

Workaround to using "Person or Group" field in a "Calculated" column formula?


Apparently, SharePoint does not allow you to insert a "Person or Group" column into a "Calculated" field's formula.

Is there a workaround to adding a "Person or Group" column into a "Calculated" field's formula?

-Maybe a way of coverting the data from the Person or Group column into a text field, and referencing that text field in the formula?

Microsoft mentions only Columns of the following data types can be referenced in a formula: single line of text, number, currency, date and time, choice, yes/no, and calculated.

Default Value for 'Person or Group' column in a Sharepoint 2010 Custom List



In Sharepoint 2010 I have a Custom List with a column of the type 'Person or Group'.
I would like to have a default name for this 'Person or group' column.
So when a user creates a new list entry and leves the 'Person or Group' column value blank the list entry should be created with the default value für the 'Person or Group' column.

Is there a way to schieve this?

Many thanks in advance.

Roberto Rocco.



Problem assigning a Person or Group field dynamically in workflow

I am trying to create a workflow that gets some information about the submitting user to determine the group to assign to a person or group field in the same list item. I have verified that the string name of the group is being built properly by assigning a separate text field the group name value, this works fine, but when the workflow tries to set the person or group field to the group name string it stops the workflow and shows 'unknown error'. I assumed that it just wasn't performing the lookup for the group, so I created another list that maps the group name string to the appropriate group, and had the workflow lookup the item from that list. It is still giving me the same error when I try to assign the first person or group field to the value of the second person or group field that I have looked up. I am now out of ideas... Help please!

SP2007 Doc Info Panel (Person or Group column) and Word 2010


I have a SharePoint 2007 Document Library with many columns. Some of the columns are of type Person or Group.

When a user opens the document in the Word 2007 the Person or Group column contains the correct user name, however when the same document is opened in Word 2010 the Person or Group column contains a number (e.g. 39) and not the name.

Anyone know what is causing this?

Sharepoint list group by column data ,display in webcontrol like panel or label


I  have a sharepoint list[Managers] with groupby sector column. like below




Each Sector group by column data i want to display in label or panel control.

How to do that ? how to write the logic?



Regards, Mansoor

How to get User group in SharePoint Designer 2010 within workflow?

Hi, How to get user group in sharepoint designer within workflow? Basically I have to compair that current user is belongs to particular group or not.  How can I get check user group in workflow's if condition? G. Goyal

Activiate Email forwarding with Person Group Picker field

I have inserted 3 person group picker fiels.  I need to set them up so when a user selects a user, it shoots off an email.  I was told that I can set this up in SP designer via a workflow?  If so, can anyone let me know how to set this up properly? Thanks!  Bill KreuderIm a new MS CRM Consultant that is learing all things CRM. Im very excited about 4.0!!!!

Group Results By Month, showing each month as the column

I have to list 50 states and the # of population per month. right now my results look something like..   CA, June, 5000 CA, July, 6000 CA, August, 7000 CA, September, 7230 I want it to show.. State, June, July, August, September CA, 5000, 6000, 7000, 8000 NJ, 4013, 5030, 7020, 7310   I was going to use a PIVOT table but.. I want the columns to expand as the coming month  comes upon us.

Question in row group not updating on when the column value changes

I'm using Report Builder 3.0 and created a row group column and then moved it to a row about the detail columns instead of leaving it as a column at the left.  When I run the report the group value doesn't change  but the page break occurs.  I added the same field as a column so I can see the value is different. Why is the row group field not changing?

Problem when using calculated column as column group in a view

Hi,   I have a list with a calculated column named 'FullName', the formula is: "FirstName & " " &  LastName". I created a view group by 'FullName' column. The follow error appeared on the column:   &lt;!-- #RENDER FAILED --&gt;   Please help

Group activities in to rehosting workflow.

I want to group multiple activities in rehosted workflow designer.

Assigning a task based on 'person' column.

Hi All, I am creating an employee of the month type feature in Visual Studio. This involves a nominations list (where users can submit a nomination) and a custom task list (based on workflow tasks) In a nomination, a "Line Manager" is entered, and is set up as a Person Column. In code, I create a task, and I am trying to assign the task to the line manager. The code I have is: taskProperties.AssignedTo = workflowProperties.Item[ "Line Manager"].ToString(); This does return the name of the nominator (but with a prefix, usually #795; (or something like that)). How can I assign a task in code to a user based on the selection of a Person field (chosen using People Picker)?    Andrew Berry - Software analyst/Developer
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend