locked
lookup field: workaround to save the values RRS feed

  • Question

  • Hello,

    In a list A, I have a lookup field that points to list B. The list B is the people that work for this department.

    When someone leaves the department, I go and delete the user from list B. The problem is that all items in list A that have this user in the lookup field, loose this value.

    Is there a workaround? One solution is to "copy" the lookup field values to  a text. The other solution is to make a new field(choise). When a user changes the lookup field, a workflow will copy in the field choise the lookup field values. When a new item adds in B, a new category item will add in field category.

    Any other recommendations?

    Thank you


    Christos

    Tuesday, September 3, 2013 10:40 AM

Answers

  • The people picker will only allow you to select users who have active accounts in AD. You would only be able to select users who are present in the company.

    In addition you can restrict the people you can choose further when you define the column.

    • Marked as answer by XristosK Thursday, September 5, 2013 8:31 AM
    Thursday, September 5, 2013 6:12 AM

All replies

  • You could change the people list so that users aren't deleted on exit. They can still be included but flagged with a 'leavers' field.

    Or you could create a people picker column that only allows you to add users from a particular SharePoint or AD group.

    Tuesday, September 3, 2013 6:23 PM
  • Hi Christos,

    I agree with Alex, it is a better approach to use another field to flag a user "leave" in list B instead of deleting this user item, then you can also display this field as additional column in list A, even you can create a new list view by grouping this "leave" field in list A.

    http://sharepointsolution2010.blogspot.in/2011/02/show-additional-columns-from-lookup.html

    Thanks


    Daniel Yang
    TechNet Community Support

    Wednesday, September 4, 2013 3:27 AM
  • Thank you for yr answers.

    I think I'm missing something. I think the lookup fields cannot be filtered.So, the user, when it selects the persons in the lookup field, he/she will still be able to see All the people, :Gone or not gone".

    Another approach is to play with calculated fields, like :

    http://sharepoint.stackexchange.com/questions/18247/how-to-make-a-filtered-lookup-field

    But it still poses the problem that when a user is flagged as "gone" in B, the main list A will delete her/his name.

    Another approach is to also show the field "gone or not gone", just for informational purposes. Or use https://filteredlookup.codeplex.com/

    The only think I can think OOTB of is people picker that works even if the user is deleted (tested).


    Christos

    Wednesday, September 4, 2013 10:09 AM
  • The people picker will only allow you to select users who have active accounts in AD. You would only be able to select users who are present in the company.

    In addition you can restrict the people you can choose further when you define the column.

    • Marked as answer by XristosK Thursday, September 5, 2013 8:31 AM
    Thursday, September 5, 2013 6:12 AM