Auto filling in Data in a browser enabled form - InfoPath Dev
in

InfoPath Dev

Auto filling in Data in a browser enabled form

Last post 09-23-2008 02:50 PM by alneff. 13 replies.
Page 1 of 1 (14 items)
Sort Posts: Previous Next
  • 08-28-2008 02:26 PM

    • jrudolph
    • Top 150 Contributor
      Male
    • Joined on 07-02-2008
    • Orlando, FL
    • Posts 67

    Auto filling in Data in a browser enabled form

    I have a form that is published in a SharePoint library and I am wanting to make it so that when a user opens the form a few vital pieces of information are automatically filled in, such as their name and employee number.  We use Authenticated Windows log-on for using Windows and the user also logs-in to SharePoint, generally with the same user name and password.

    Is there a funtion within InfoPath that allows for this type of information to be extracted without the use of code? I have tried some data connections but have failed so far to come up with a useable solution.

    Any help, tips, or otherwise would be appreciated.

    Thanks in advance.

  • 08-29-2008 03:44 AM In reply to

    • alneff
    • Not Ranked
      Male
    • Joined on 08-27-2008
    • New York
    • Posts 6

    Re: Auto filling in Data in a browser enabled form

    I'm having a similar issue as well.  The form works great pulling data in from a sql database when I use InfoPath directly; however when the form is publlished to SharePoint as browser enabled it does not work--error.  From what I can tell,since it is passing a paramaterized query (username) you have to use a webservice as an intermediary.  Sorry I can't offer more at the moment; I will post more here once I have it figured out.

  • 08-29-2008 08:27 AM In reply to

    • jrudolph
    • Top 150 Contributor
      Male
    • Joined on 07-02-2008
    • Orlando, FL
    • Posts 67

    Re: Auto filling in Data in a browser enabled form

    I have the same problem, pulling the information from a sql database is not a problem, its when I move the form to SharePoint that it becomes an issue. I may have to move to our programmers and see what they can do, but I will take any tips if you come across anything.
  • 08-29-2008 01:13 PM In reply to

    • dlocc
    • Top 500 Contributor
    • Joined on 06-23-2008
    • San Diego
    • Posts 28

    Re: Auto filling in Data in a browser enabled form

    Hello everyone,

     It seems you guys want to pull information from SharePoint about the current form user and have it populate the browser compatible form.  Well, good news! There is a no-code, easy approach to this. 

    We can do get this information via a webservice located at: Http://servername/_vti_bin/UserProfileService.asmx 

     For the whole procedure check this out: http://blogs.microsoft.co.il/blogs/itaysk/archive/2007/04/05/InfoPath-_2D00_-Get-the-current-user-without-writing-code.aspx 

    Devin Walker
    http://www.dlocc.com
  • 08-29-2008 02:44 PM In reply to

    • jrudolph
    • Top 150 Contributor
      Male
    • Joined on 07-02-2008
    • Orlando, FL
    • Posts 67

    Re: Auto filling in Data in a browser enabled form

    Thanks for the link.

    So far its not working for me, but I will continue to play around with the method.

  • 08-29-2008 02:53 PM In reply to

    • jrudolph
    • Top 150 Contributor
      Male
    • Joined on 07-02-2008
    • Orlando, FL
    • Posts 67

    Re: Auto filling in Data in a browser enabled form

    I lied this works perfectly!!! Great method that I would never have even thought about.

    I misplaced a quote sign of all things and it kept returning nothing. It took me three times before I realized what I had done wrong.

     Thanks again.

  • 08-29-2008 03:01 PM In reply to

    • dlocc
    • Top 500 Contributor
    • Joined on 06-23-2008
    • San Diego
    • Posts 28

    Re: Auto filling in Data in a browser enabled form

    No problem,

    This is the most useful way to prepopulate forms with user information from SharePoint via webservices.  Glad you got it to work, it's fairly straight forward.

    Thanks,

    Devin Walker
    http://www.dlocc.com
  • 08-29-2008 03:51 PM In reply to

    • alneff
    • Not Ranked
      Male
    • Joined on 08-27-2008
    • New York
    • Posts 6

    Re: Auto filling in Data in a browser enabled form

    looks cool, I'll check into this next week.
    My dilemma however is that I'm trying to pull HR data into a browser-enabled form from SQL (vacation hours, sick time, etc.) based on the username I am passing to a stored procedure.
    As far as I can tell, I need to create a custom web service as the go between for the form and Sql Server not the SharePoint Web Services.

    any insight on this would be great.  I'm sure I will use the other info provided for other projects though; thanks.

  • 08-29-2008 04:01 PM In reply to

    • dlocc
    • Top 500 Contributor
    • Joined on 06-23-2008
    • San Diego
    • Posts 28

    Re: Auto filling in Data in a browser enabled form

    Yes you are correct... simply make a webservice using Visual Studio to pull the data.  I'm sure it won't be long until someone from Qdabra see's this and recommends their SQL webservice products. hehe

    Devin Walker
    http://www.dlocc.com
  • 09-02-2008 05:36 AM In reply to

    • jrudolph
    • Top 150 Contributor
      Male
    • Joined on 07-02-2008
    • Orlando, FL
    • Posts 67

    Re: Auto filling in Data in a browser enabled form

    Part of what I am looking to do is similar to alneff.  I am wanting to auto populate information such as employee number and in some cases address.  The users name field is working perfectly, however does anyone know if there are fields within the web services given examples that has the employee number etc included?  I am new to using web services in this way and I am not sure what information all those available fields contain.

  • 09-03-2008 02:00 PM In reply to

    • alneff
    • Not Ranked
      Male
    • Joined on 08-27-2008
    • New York
    • Posts 6

    Re: Auto filling in Data in a browser enabled form

    alrighty then--

    so I finally created my web service and deployed it, everything works great.  however, I feel like I have come full circle; because when I browser-enable and publish I am still getting the same error I was before?

    An error occurred accessing a data source.
    An entry has been added to the Windows event log of the server.
    Log ID:5566

    I checked the server logs and the Moss logs and ...nothing?

    I'm guessing some weird permission thing; any ideas anyone?

  • 09-16-2008 01:44 PM In reply to

    • Bhavesh
    • Top 500 Contributor
      Male
    • Joined on 05-01-2008
    • Atlanta
    • Posts 40

    Re: Auto filling in Data in a browser enabled form

    hi,

    you can add one secondary data source to your infopath which is for receiving a data. Select a web service as a data source then specify the out of box web service http://servername/_vti_bin/usergroup.asmx?op=GetUserInfo

    you pass the loginname as input param to the web service and will get

    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
       <soap:Body>
          <GetUserInfoResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/directory/">
             <GetUserInfoResult>
                <GetUserInfo>
                   <User ID="1" Sid="some number id" Name="lastname, firstname" LoginName="userloginname" Email="userlogin" Notes="" IsSiteAdmin="True" IsDomainGroup="False"/>
                </GetUserInfo>
             </GetUserInfoResult>
          </GetUserInfoResponse>
       </soap:Body>
    </soap:Envelope> 

    Hope this will work for you.

    Bhavesh

     

  • 09-23-2008 08:37 AM In reply to

    • jrudolph
    • Top 150 Contributor
      Male
    • Joined on 07-02-2008
    • Orlando, FL
    • Posts 67

    Re: Auto filling in Data in a browser enabled form

    Thanks, this is what we have implemented.

  • 09-23-2008 02:50 PM In reply to

    • alneff
    • Not Ranked
      Male
    • Joined on 08-27-2008
    • New York
    • Posts 6

    Re: Auto filling in Data in a browser enabled form

    Just a follow up to the previous posts of this thread, and things to be aware of when testing browser enabled forms...

    After a lot of researching and testing, it ended up being a double-hop issue that I was dealing with.

    By putting explicit authentication in the udx file and testing that; if it works and it previously wasn't, then that helps to clarify that the double hop issues exists.

    Also following which, I moved the custom web service that I created to a WFE server rather than a separate server and after removing the explicit authentication, this also worked.

    I was testing some browser-enabled form options and I kept having an issue with this.  Of course we are looking into more secure security methodologies but these are good troubleshooting tips if you run into a similar issue.

    --Adam

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