populate text box from webservice - InfoPath Dev
in

InfoPath Dev

populate text box from webservice

Last post 09-12-2007 05:08 AM by heath3106. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 09-11-2007 06:42 AM

    populate text box from webservice

    I have a form that I am building based on an Access database. I am an InfoPath newbie and just trying to learn jscript. I want to receive data from our HR systems to prefill specific fields when the user opens the form. I've been able to get the LAN ID field to populate on the form but can't get the other data elements that are part of my secondary data connection (web service) to show up on the form .Below is the code I'm using. Any help on how to add the text box controls and get them to pull the data correctly would be appreciated.

     

    function XDocument::OnLoad(eventObj)

    {

                XDocument.QueryAdapter.Timeout=60;

                var userIDField=XDocument.DOM.selectSingleNode("dfs:myFields/my:LANUserID");

                var userID=GetUserID();

                if (userIDField.text == "") {userIDField.text=userID;}

    }

     //Also need for web service//

    function GetUserID()

    {

                  var objNetwork = new ActiveXObject("Wscript.network");

                  var uid = objNetwork.UserName;

                  return uid;

    }

  • 09-11-2007 10:09 AM In reply to

    Re: populate text box from webservice

    Hey Heath,

    I have done a similar project in HR.

    I would strongly recommend you check out the Database Accelerator Web Suite. Qdabra Database Accelerator Suite Version 2.1.2808 - Developer

    This gives you everything you need to identify the user and then more importantly secure it per user or to say a manager's direct reports.  It is a whole toolkit of web services to interact with your databases.

    If you need any advice or would like a demo of a similar project just email me by clicking on my name in the sidebar.

     

    Filed under:
  • 09-12-2007 05:08 AM In reply to

    Re: populate text box from webservice

    Clay,

    Unfortunately I don't have admin rights for my pc at work. We can't download software that is not supported by our IT department. Any suggestions that would help without downloading the suite?

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