Getting Sharepoint username in the infopath form - InfoPath Dev
in

InfoPath Dev

Getting Sharepoint username in the infopath form

Last post 02-03-2009 10:25 PM by harshchandra. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 02-03-2009 01:42 AM

    Getting Sharepoint username in the infopath form

    Hi all, I have a infopath published in one of the document library of sharepoint . Any user can fill out this form. I want to know is there anyway to get the username of the sharepoint site who has currently logged on the site.

     

    For example : If the user administrator is logged on to his teminal and he he is logggin in with the ID domainName\someOtherUser to the sharepoint .

    I want the someotherUser as a field in infopath. I have tried many ways to achieve this task. But all those ways give me the user ID of the person logged on to the system and not logged as sharepoint site. Any Help will be appreciated

     Thanks in advance

  • 02-03-2009 02:23 AM In reply to

    • Anuma
    • Top 25 Contributor
      Female
    • Joined on 07-20-2005
    • India
    • Posts 525

    Re: Getting Sharepoint username in the infopath form

    Hi,

    Can you verify below link.

    http://baigadil.blogspot.com/2008/07/get-current-user-for-infopath-and-set.html

    I hope this will help you.

    Anuma Chinthapalli /
    http://www.GGKTech.com
  • 02-03-2009 02:55 AM In reply to

    Re: Getting Sharepoint username in the infopath form

     Hi Anuma,

    Thanks for your reply .I have already implemented it, but I am only returning the Administrators profile, not the users information. I have searched the internet and cannot find the answer to my problem. Any help would be greatly appreciated..... 

    I think this returns me only the profile the user who has created that Sharepoint site not the one who is currently logged in. 

     I want the username who is currently Logged in to the sharepoint site

  • 02-03-2009 04:11 AM In reply to

    • Anuma
    • Top 25 Contributor
      Female
    • Joined on 07-20-2005
    • India
    • Posts 525

    Re: Getting Sharepoint username in the infopath form

    Hi,

    It is worked to me. I think your administrator credentials are saved in your machine.

    You will get usergroup\username if you use "Value[Name = "AccountName"]" formula

    and you will get only user name if you use the "Value[Name = "FirstName"]" formula.

    You can use code to do this by using below link.

    http://www.infopathdev.com/blogs/agni/archive/2006/06/28/Get-Name-of-Person-Logged-Into-SharePoint.aspx

     

    Anuma Chinthapalli /
    http://www.GGKTech.com
  • 02-03-2009 10:25 PM In reply to

    Re: Getting Sharepoint username in the infopath form

    Hi,

    Can u please let me know how to unsave the administrator credentials ?

Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.