<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Get UserName Code Conversion</title><link>https://www.infopathdev.com:443/forums/thread/15034.aspx</link><pubDate>Wed, 24 Jan 2007 22:08:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:15034</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/15034.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=15034</wfw:commentRss><description>Hi again,&lt;br /&gt;&lt;br /&gt;Thanks for the feedback!&lt;br /&gt;&lt;br /&gt;We sell an Active Directory Web service &lt;a target="_blank" href=http://www.qdabra.com/proddetail.asp?prod=QADWS&gt;http://www.qdabra.com/proddetail.asp?prod=QADWS&lt;/a&gt;) that many people use to get user information. Check out this post &lt;a target="_blank" href=http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=683&gt;http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=683&lt;/a&gt;) in our forum for some steps on how to query it to get user info. &lt;br /&gt;&lt;br /&gt;Unfortunately, InfoPath doesn#%92t allow you to query SQL using fields from your form. To programmatically query values from SQL, you will need our Qdabra Database Accelerator &lt;a target="_blank" href=http://www.qdabra.com/proddetail.asp?prod=QDBXL1&gt;http://www.qdabra.com/proddetail.asp?prod=QDBXL1&lt;/a&gt;). The Developer version is free. Let us know if we can help you with the installation/configuration.&lt;br /&gt;&lt;br /&gt;Cheers!</description></item><item><title>Re: Get UserName Code Conversion</title><link>https://www.infopathdev.com:443/forums/thread/15033.aspx</link><pubDate>Wed, 24 Jan 2007 14:21:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:15033</guid><dc:creator>brorick</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/15033.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=15033</wfw:commentRss><description>Patrick.  Thank you for your help.  I searched all over the place for this code on the web.  I just recently obtained a copy of the Developing Solutions with Microsoft InfoPath book. At a quick glance it looks like one of the more informative books out of the five I own on InfoPath.  I look forward to reading it as I have had all kinds of issues with InfoPath 2003.  The Company I work for will continue to use this version for at least several more months.  It has possed many challenges for me.&lt;br /&gt;&lt;br /&gt;For instance, I have an employee SQL table and I am searching for a way to lookup the current user name(Login ID).  For example if the current user name(Login ID) is LS123RB then in the OnLoad event I would like to automatically lookup this Login ID in the employee table and autopopulate the employees department name field, manager's name field and so fourth.  Can you point me in the direction as to where I can find out how to accomplish this?  Your help is greatly appreciated.  Thank you.</description></item><item><title>Re: Get UserName Code Conversion</title><link>https://www.infopathdev.com:443/forums/thread/15032.aspx</link><pubDate>Tue, 23 Jan 2007 20:54:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:15032</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/15032.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=15032</wfw:commentRss><description>Hi Brorick and welcome to our forum,&lt;br /&gt;This example is in Chapter 2 of my book. &lt;br /&gt;&lt;br /&gt;Dim name As String&lt;br /&gt;name = Environment.UserName&lt;br /&gt;thisXDocument.DOM.selectSingleNode("/my:myFields/my:employee").text = name&lt;br /&gt;</description></item><item><title>Get UserName Code Conversion</title><link>https://www.infopathdev.com:443/forums/thread/13036.aspx</link><pubDate>Tue, 23 Jan 2007 14:06:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13036</guid><dc:creator>brorick</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13036.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13036</wfw:commentRss><description>The following code works perfectly when I use it with a C# Infopath&lt;br /&gt;template.  I am not familiar with C # and therefore I am limited as to&lt;br /&gt;what else I can do with the form.  Can anyone tell me how to convert&lt;br /&gt;the following code to VB script.  Thank you in advance.&lt;br /&gt;&lt;br /&gt;IXMLDOMNode nodeEmployee =&lt;br /&gt;				thisXDocument.DOM.selectSingleNode("my:myFields/my:employee");&lt;br /&gt;			if(nodeEmployee != null)&lt;br /&gt;			{&lt;br /&gt;				if(nodeEmployee.text == "")&lt;br /&gt;				{&lt;br /&gt;					// if the employee name is blank when we load the form,&lt;br /&gt;					// populate the employee node with the current user name&lt;br /&gt;					nodeEmployee.text = System.Environment.UserName;&lt;br /&gt;				}&lt;br /&gt;			}&lt;br /&gt;</description></item></channel></rss>