locked
Acceptable People Picker field Data Input?!? RRS feed

  • Question

  • I currently have a SharePoint 2007 site with custom forms on it and an Access 2007 database linked to the lists within the SharePoint site.  From SharePoint, my forms successfully utilize the available People Picker fields to allow users to select internal users who should be assigned to a specific entry.  The problem that I am having is on the Access 2007 database side to update assigned users to an entry in a SharePoint list.

    The process that I have devised is to have a single line of text field in the same SharePoint list, which administrator users in my Access Database can update this text field with specific user information.  When a change is made to an entry, I have a Workflow that checks these specific single line of text fields to see if they contain information.  If they do, then the information is copied from these fields to the actual People Picker fields in the same record. 

    My initial thoughts was to have the user login entered in the single line of text field which would then be copied to the People Picker field and should resolve to the appropriate stored information in the People Picker field, but I have found that this is not a 100% gaurantee!  Even though, in the People Picker fields in the SharePoint forms you can enter a user's login and it will resolve to their Name with no problems (unless there are multiple entries for the same user, which is not very often and is not the case for the issues found so far in my Access Database).

    I have found that if the Domain is included with the User Login (Domain\Login), it has a better success rate, but have still encountered a few instances where the people picker fails to resolve.  Also, the other issue is that in my company, we have multiple domains which are unknown to us (we don't have access to Active Directory or Admin privileges to view this information), so using this information all the time is not possible.

    Another step that we have taken is to have our user login resolved within our Outlook emails to the display name, which is also stored in the User Information List in SharePoint.  This also resolved most of the time, but occassionally would fail as well.

    So, I am wondering if there is a 100% fool proof bit of text that could be entered into a Single Line of Text field that would be copied to the People Picker fields and would resolve every time to the appropriate user information to be stored without throwing errors.  Does anyone have any suggestions?  (Remember, the single line of text fields are being updated from Access, not SharePoint, so the User Information List only displays users already applied to records in the SharePoint Lists so not all users will be there to select from; I had thought of using a DLookup to try and resolve them prio to saving, but realized this issue)

    Also, I just remembered to include that the error is known by the Workflow receiving an Status Code of 3 (Error Occurred) ... if this helps any. 

    Friday, July 6, 2012 12:36 PM

Answers

  • I have done some more digging on this issue and have recently found that there can be issues encountered when you are attempting to update a field in the current record from another field in the same record.  The suggestion that I found was to instead of doing a direct copy from one field to another is to use a Workflow Variable to store the content from one field and then update the field with the variable.  So, where my Workflow had previously been setup with the Action Set [Field1] to [Field2], I now have added a few additional actions in my Workflow as follows:

    Set [Variable:Field1] To [Field1]
    then Log [Variable:Field1] to the workflow history list
    then Set [Field2] to [Variable:Field1]

    With the above set of actions, I have been able to successfully change my People Picker fields utilizing a Single Line Text field to enter ONLY a user's login (this is great in that my users don't need the Domain; even though the Domain\Login wasn't 100% every time).  So far, I have not encountered any workflow errors, but with the addition of the logging the Stored Variable information to the workflow history list, I am hoping that if an error does occur I should have a better idea of where the workflow may be failing.

    In addition to the above, I have also been able to create a conditional Else in my workflow where if no information was provided or if the existing information was removed, the empty variable will be used to update the People Picker field in the SharePoint list.  This removes any existing information from the People Picker field and leaves it as "Null".  Which also removes me from having to manually remove user names from entries.

    I will continue to monitor my workflow in production with the above changes and if I don't see any issues in the next month or so, then I will mark this question as resolved.  Otherwise, I will respond back with my failure and be seeking direction again.  Wish me luck!

    Monday, July 9, 2012 5:09 PM