<?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: Getting corrent user</title><link>https://www.infopathdev.com:443/forums/thread/57053.aspx</link><pubDate>Sat, 17 Jul 2010 13:40:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:57053</guid><dc:creator>Skarn</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/57053.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=57053</wfw:commentRss><description>&lt;p&gt;I had similar problems in my workplace - the Network object would not be created (permission denied when I debugged) but Infopath reports no error when the form was opened - just an empty field.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I have 2 solutions I used - get user to enter their login name into a field - then use the &amp;#39;IsCurrentUser&amp;#39; function of Infopath to validate that what they put in really is their user name - don&amp;#39;t forget to put the domain name for your workplace&amp;nbsp;at the beginning for the &amp;#39;IsCurrentUser&amp;#39; function.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;The other way was I had an SQL server with a &amp;#39;view/stored procedure&amp;#39; which had only the &amp;#39;SUSER&amp;#39; variable as a value. By referencing this view as a secondary datasource and retrieving the values when the form opens - I immediately make the current username available to the form in the secondary datasource field. If you have an SQL database you can use in this way - I think this is the nicest method.&lt;/p&gt;</description></item><item><title>Re: Getting corrent user</title><link>https://www.infopathdev.com:443/forums/thread/55328.aspx</link><pubDate>Wed, 26 May 2010 12:31:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55328</guid><dc:creator>Sara Campo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55328.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=55328</wfw:commentRss><description>&lt;span style="FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;FONT-SIZE:12pt;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-ansi-language:IT;mso-fareast-language:IT;mso-bidi-language:AR-SA;"&gt;Not working, the field is empty.&lt;/span&gt;</description></item><item><title>Re: Getting corrent user</title><link>https://www.infopathdev.com:443/forums/thread/55323.aspx</link><pubDate>Wed, 26 May 2010 12:04:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55323</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55323.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=55323</wfw:commentRss><description>&lt;p&gt;Is your code producing any particular error, or just not working?&lt;/p&gt;</description></item><item><title>Re: Getting corrent user</title><link>https://www.infopathdev.com:443/forums/thread/55321.aspx</link><pubDate>Wed, 26 May 2010 11:01:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55321</guid><dc:creator>Sara Campo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55321.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=55321</wfw:commentRss><description>&lt;p&gt;I using&amp;nbsp;Infopath 2003.&lt;/p&gt;</description></item><item><title>Re: Getting corrent user</title><link>https://www.infopathdev.com:443/forums/thread/55320.aspx</link><pubDate>Wed, 26 May 2010 10:47:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55320</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55320.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=55320</wfw:commentRss><description>&lt;p&gt;Why not use InfoPath&amp;#39;s userName() function?&lt;/p&gt;</description></item><item><title>Getting corrent user</title><link>https://www.infopathdev.com:443/forums/thread/55319.aspx</link><pubDate>Wed, 26 May 2010 10:12:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55319</guid><dc:creator>Sara Campo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55319.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=55319</wfw:commentRss><description>&lt;div class="ForumPostContentText"&gt;I have a big trouble. I need to get the username but i can&amp;#39;t create an activexobject. the code that i&amp;#39;m using is:&lt;br /&gt;&lt;/div&gt;
&lt;div class="ForumPostContentText"&gt;&lt;em&gt;Sub XDocument_OnLoad(eventObj)&lt;br /&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div class="ForumPostContentText"&gt;&lt;em&gt;Dim wsh &lt;/em&gt;&lt;/div&gt;
&lt;div class="ForumPostContentText"&gt;&lt;em&gt;Dim un &lt;/em&gt;&lt;/div&gt;
&lt;div class="ForumPostContentText"&gt;&lt;em&gt;&lt;/em&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class="ForumPostContentText"&gt;&lt;em&gt;wsh = CreateObject(&amp;quot;WScript.Network&amp;quot;) &lt;/em&gt;&lt;/div&gt;
&lt;div class="ForumPostContentText"&gt;&lt;em&gt;un = wsh.UserName&lt;/em&gt;&lt;/div&gt;
&lt;div class="ForumPostContentText"&gt;&lt;em&gt;&lt;/em&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class="ForumPostContentText"&gt;&lt;em&gt;XDocument.UI.Alert(un)&lt;/em&gt;&lt;/div&gt;
&lt;div class="ForumPostContentText"&gt;&lt;em&gt;XDocument.DOM.selectSingleNode(&amp;quot;//my:campiPersonali/my:user&amp;quot;).text = un&lt;/em&gt;&lt;/div&gt;
&lt;div class="ForumPostContentText"&gt;&lt;br /&gt;&lt;em&gt;end sub&lt;/em&gt;&lt;/div&gt;
&lt;div class="ForumPostContentText"&gt;&lt;br /&gt;Any sugestion? &lt;/div&gt;</description></item></channel></rss>