none
getting email address from name RRS feed

  • Question

  • hi,

     

    I have an infopath form where I have the user input the name of his/her manager.  From there, I update the list in SP (2007) and I would like to use that in a workflow.  How do I get that user name and do a lookup in AD to get the email address?  Is that possible?

    thank you!


    mhoran
    Thursday, June 9, 2011 11:49 PM

Answers

  • You could do this without writing any code. Take a look at this article. All you would need to do is set the properties. http://blogs.microsoft.co.il/blogs/itaysk/archive/2007/04/05/InfoPath-_2D00_-Get-the-current-user-without-writing-code.aspx

    Hope this helps.


    V
    Friday, June 10, 2011 2:01 AM
  • Hi ,

     

    Add to V284’s reply .I have a workaround .

    1.        You can create a column named manager in the from library where the info path forms are stored and choose the ‘Require that this column contains information’ .Then every time a user creates or uploads a form ,he will provide the manager name  .

    2.       Add a workflow to the form library to create or update an item in the list . You can also send an email to the manager by setting the ‘To’ field to ‘workflow lookup’ .Then specify the lookup field to the column manager .

     

    Thanks,


    Regards, Rock Wang Microsoft Online Community Support
    Friday, June 10, 2011 12:38 PM

All replies

  • You could do this without writing any code. Take a look at this article. All you would need to do is set the properties. http://blogs.microsoft.co.il/blogs/itaysk/archive/2007/04/05/InfoPath-_2D00_-Get-the-current-user-without-writing-code.aspx

    Hope this helps.


    V
    Friday, June 10, 2011 2:01 AM
  • Hi ,

     

    Add to V284’s reply .I have a workaround .

    1.        You can create a column named manager in the from library where the info path forms are stored and choose the ‘Require that this column contains information’ .Then every time a user creates or uploads a form ,he will provide the manager name  .

    2.       Add a workflow to the form library to create or update an item in the list . You can also send an email to the manager by setting the ‘To’ field to ‘workflow lookup’ .Then specify the lookup field to the column manager .

     

    Thanks,


    Regards, Rock Wang Microsoft Online Community Support
    Friday, June 10, 2011 12:38 PM
  • thanks for both of your replies. I used the getuserprofilebyname to get the name of the person who creates the form and fills the name in. I can get the email address. But, I can't seem to get the manager's address ( I tried using the 'lookup' in the workflow, but I got an error that it wasn't found in AD).  But, I did see something in another post that might work, except that I'm not sure how to do this.   The person wanted like to get information from the getuserprofilebyname based on a text field on the form.  Supposedly it can be done by setting a rule to 'copy the accountID value' to the field in the WS connection and then query it.    I'll keep trying it until I figure it out.   THanks. http://www.infopathdev.com/forums/p/14628/52017.aspx


    mhoran
    Friday, June 10, 2011 5:57 PM