Get the SharePoint User in InfoPath - InfoPath Dev
in

InfoPath Dev

Get the SharePoint User in InfoPath

Last post 01-06-2007 01:43 AM by happydigit. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 01-04-2007 05:35 AM

    Get the SharePoint User in InfoPath

    Hello,

    I tried last time many thing in InfoPath and SharePoint. I'am now able to put code behind in forms and to render this forms in SharePoint as Webform. Nice! :)

    Now I wan't to create a form with only two fields: name and comment. The name field musst be field out with the current user-name in SharePoint. I know, in this forum is a thread wich descripe a How-To but it don't work.

    Have anyone ideas or c# code to solve my problem?!

    Here is one code I wrote in the FormEvents_Loading:

    System.Xml.XPath.XPathNavigator root, user;
    root = this.MainDataSource.CreateNavigator();
    user = root.SelectSingleNode("//my:name",this.NamespaceManager);
  • 01-04-2007 06:18 AM In reply to

    Re: Get the SharePoint User in InfoPath

    Hi happydigit,

    Did you tried this link,
    http://www.infopathdev.com/howto/tutorials/default.aspx?i=06d94826ac7a46a09a0f68238c2e0769.

    If you tried this, what error you got.

    Thanks.
    K.Ramana Reddy / http://www.ggktech.com
    India.
  • 01-05-2007 04:24 AM In reply to

    Re: Get the SharePoint User in InfoPath

    Hello,

    yes I tried this but this is too complex for my problem. I'am looking for a small solution and plain-spoken I do not realy understand this "How to". In the deep of the web I found something like this:

    SPWeb web = SPControl.GetContextWeb(System.Web.HttpContext.Current);
    SPUser spuser = web.CurrentUser;

    Have you got any ideas?
    Thanks.
  • 01-05-2007 11:21 PM In reply to

    Re: Get the SharePoint User in InfoPath

    Hi,
    But there is no other simple solution to get sharepoint user in InfoPath other than this.
    Shilpa
    INFOPATHDEV India
  • 01-06-2007 01:43 AM In reply to

    Re: Get the SharePoint User in InfoPath

    Okay, thanks for your answer.
    And this solution works with SharePoint 2007 and InfoPath 2007?
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.