none
Collect data from user where this user is a value passed from an InfoPath form? RRS feed

  • Question

  • Hi All,

    I have a scenariou I have not been able to resolve...

    - I have a sharepoint list that contains a look up (person or group) field called Sponsor.
    - I have an InfoPath form with a drop down list that recieves data from the above SharePoint list, Sponsor field.
    - In InfoPath, user selects the Sponsor and submits the form to the form library where the Sponsor field value is promoted to the InfoPaht form library.
    - I have a custom workflow on the above form library where the action "collect data from user" using the workflow lookup to get the Sponsor value from the form library.

    My problem is the workflow task does not get assisned to the Sponsor value. I have used this same method with Send Email action and that seems to work, just doesnt seen to work with collect user data" with "workflow lookup".

    Anyone have suggestions on how I can get this to work?

    Thanks in advance. 

    • Edited by Mike Walsh FIN Thursday, February 11, 2010 6:12 AM Question regarding removed, ? added
    Friday, February 5, 2010 7:08 PM

Answers

  • Which value are you passing from the list to the form and from the form to the form library?  These data types do not match, so I'm wondering how you are doing it.  In SharePoint, when you have a People Picker field, the field displays by default as the user's full name (PreferredName attribute of the user profile), but the underlying value is the AccountName attribute (domain\username).  What are you showing in you rInfopath dropdown?  Are you showing a list of AccountName?  I ask that, because it seems suprising you would do that instead of wanting to display the Full Names of users with an underlying value of AccountName.  I know there is a lot to doing this correctly, so I am wondering what all you've done to make it work and look right.  Then, when you promote the field to the form library, that value can only be a single line of text, which is not the data type of a People Picker field, so I assume you just have a regular text column in you form library that is storing the AccountName from before?  This value is then not usable to assign a task, right?

    Have you tried creating a People Picker field in your form library and then using a quick SPD workflow to take your person value and place it into the People Picker field?  You have to do it this way, because the data types can't be matched from InfoPath to SharePoint, but SPD can take a value and place it into the People Picker field, thus resolving it to a person's identity, which can then be used for the task assignment.  The only issue you may find is that I think you have to pass the email address into the People Picker field as it won't accept other values.  If you need to get the email address, then you can strip the username from the AccountName using substring-after("<name of domain prefix>\",AccountName) and then pass it to the UserProfileService (from within the InfoPath form) to retrieve the WorkEmail attribute per my blog here: InfoPath - Get user information without writing code (extended)
    SharePoint Architect || My Blog
    • Marked as answer by GuYuming Saturday, March 6, 2010 8:38 AM
    Sunday, February 7, 2010 6:48 PM