<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: getting log in id using JScript code.</title><link>https://www.infopathdev.com:443/forums/thread/70416.aspx</link><pubDate>Mon, 19 Sep 2011 15:10:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:70416</guid><dc:creator>stara</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/70416.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=70416</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Were you able to get this to work? I&amp;#39;m experiencing similar issue? The method works perfectly with &amp;quot;preview&amp;quot; but not when form is published. Please help.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Stara&lt;/p&gt;</description></item><item><title>Re: getting log in id using JScript code.</title><link>https://www.infopathdev.com:443/forums/thread/40215.aspx</link><pubDate>Wed, 01 Apr 2009 12:08:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:40215</guid><dc:creator>Svetoslav</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/40215.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=40215</wfw:commentRss><description>&lt;p&gt;Hi all, for getting the user ID in IP2003 I am using the following code: &lt;/p&gt;
&lt;p&gt;var wshShell = new ActiveXObject(&amp;quot;Wscript.Shell&amp;quot;);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;var wshEnv = wshShell.Environment(&amp;quot;Process&amp;quot;);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;var username = wshEnv.Item(&amp;quot;UserName&amp;quot;);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;var name = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:name&amp;quot;);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;name.text = username; &lt;/p&gt;
&lt;p&gt;when I am designing the form, this method works perfectly with &amp;quot;preview&amp;quot;. But after I save the form, or publish ot sharepoint it doesn&amp;#39;t work. I have put the code inside On Load event, so that everytime the user opens he form, it records it user ID. I have read the forums here and I couldnt find any answer except this code or the Web Service you proposed. Can you give some answers or to direct me to a solution using Jscript ? &lt;/p&gt;
&lt;p&gt;Thank you in advance&lt;/p&gt;
&lt;p&gt;Svetoslav &lt;/p&gt;</description></item><item><title>Re: getting log in id using JScript code.</title><link>https://www.infopathdev.com:443/forums/thread/26291.aspx</link><pubDate>Fri, 08 Feb 2008 00:45:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26291</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26291.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=26291</wfw:commentRss><description>&lt;p&gt;Unfortunately, without a Web service, user information is a security issue. In managed code you can get the user alias without seucirty issues, and that&amp;#39;s it. A Web service is needed if you want to get more detailed information.&lt;/p&gt;</description></item><item><title>Re: getting log in id using JScript code.</title><link>https://www.infopathdev.com:443/forums/thread/26226.aspx</link><pubDate>Wed, 06 Feb 2008 14:20:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26226</guid><dc:creator>m181354</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26226.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=26226</wfw:commentRss><description>&lt;p&gt;I am using InfoPath 2003 and have the following code to get user id.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;var wshShell = new ActiveXObject(&amp;quot;Wscript.Shell&amp;quot;);&lt;br /&gt;var wshEnv = wshShell.Environment(&amp;quot;Process&amp;quot;);&lt;br /&gt;var username = wshEnv.Item(&amp;quot;UserName&amp;quot;);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;But I get a popup that reads...&lt;/p&gt;
&lt;p&gt;An ActiveX control on the page might be unsafe to interact with the other parts of the page.&amp;nbsp; Do you want to allow this interaction?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Do you know&amp;nbsp;how I can eliminate this popup?&amp;nbsp; I have updated my Security Custom Level on IE to&amp;nbsp;enable ActiveX controls.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: getting log in id using JScript code.</title><link>https://www.infopathdev.com:443/forums/thread/25397.aspx</link><pubDate>Fri, 04 Jan 2008 00:44:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25397</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25397.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=25397</wfw:commentRss><description>&lt;p&gt;Here&amp;#39;s the one we sell:&lt;/p&gt;&lt;p&gt;http://www.qdabra.com/en/products/ADWebService.aspx &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: getting log in id using JScript code.</title><link>https://www.infopathdev.com:443/forums/thread/25387.aspx</link><pubDate>Thu, 03 Jan 2008 17:30:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25387</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25387.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=25387</wfw:commentRss><description>&lt;p&gt;User name is available to full trust forms. Otherwise, you will need to use a Web service to accomplish this.&lt;/p&gt;</description></item><item><title>Re: getting log in id using JScript code.</title><link>https://www.infopathdev.com:443/forums/thread/25369.aspx</link><pubDate>Thu, 03 Jan 2008 15:54:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25369</guid><dc:creator>m181354</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25369.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=25369</wfw:commentRss><description>&lt;p&gt;This worked great for Infopath 2003...thank you very much.&amp;nbsp;&amp;nbsp; Now I would like to take the user ID and get User Name.&amp;nbsp; Looking into options. &lt;/p&gt;</description></item><item><title>Re: getting log in id using JScript code.</title><link>https://www.infopathdev.com:443/forums/thread/25260.aspx</link><pubDate>Fri, 21 Dec 2007 18:21:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25260</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25260.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=25260</wfw:commentRss><description>&lt;p&gt;If you are using InfoPAth 2003:&lt;/p&gt;
&lt;p&gt;var wshShell = new ActiveXObject(&amp;quot;Wscript.Shell&amp;quot;);&lt;br /&gt;var wshEnv = wshShell.Environment(&amp;quot;Process&amp;quot;);&lt;br /&gt;var username = wshEnv.Item(&amp;quot;UserName&amp;quot;);&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you are using InfoPath 2007, the user name is built in. For example:&lt;/p&gt;
&lt;p&gt;* Insert a text box.&lt;br /&gt;* Right-click the text box and choose properties.&lt;br /&gt;* Click the Default Value function button&lt;br /&gt;* Click Insert Fucntion&lt;br /&gt;* Select the &amp;quot;All&amp;quot; category, and then scroll down and select&amp;nbsp;the &amp;quot;userName&amp;quot; function.&lt;br /&gt;* Click OK 3 times.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>getting log in id using JScript code.</title><link>https://www.infopathdev.com:443/forums/thread/25172.aspx</link><pubDate>Tue, 18 Dec 2007 20:03:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25172</guid><dc:creator>m181354</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25172.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=25172</wfw:commentRss><description>&lt;div class="ForumPostContentText"&gt;Is there a&amp;nbsp;way to get log in id using JScript code?&amp;nbsp; I know there is a way using managed code...which I will use at a later date. &lt;/div&gt;
&lt;div class="ForumPostContentText"&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class="ForumPostContentText"&gt;&lt;br /&gt;&amp;nbsp;&lt;/div&gt;</description></item></channel></rss>