<?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>Browser Forms</title><link>https://www.infopathdev.com:443/forums/40.aspx</link><description>For browser form specific questions</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Retrieve current user name through webservice</title><link>https://www.infopathdev.com:443/forums/thread/82610.aspx</link><pubDate>Thu, 13 Sep 2012 05:23:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:82610</guid><dc:creator>Gennady Vanin (Геннадий Ванин, Новосибирск)</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/82610.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=82610</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/infopathdev/images/icon-quote.gif"&gt; &lt;strong&gt;Shrout1:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;If you have a &amp;quot;filler&amp;quot; enabled form and your users are accessing the form via a different domain (I.E. they are using a home computer to fill out a form on a corporate server)&amp;nbsp;then **&lt;b&gt;take note** &lt;/b&gt;that &amp;quot;userName()&amp;quot; will return their *current* username&lt;/div&gt;&lt;/BLOCKQUOTE&gt; &lt;/p&gt;&lt;p&gt;More precisely, userName() in Infopath Filler (even opened from sharepoint) returns username with which a user logged-in into its Windows on local/client machine. It can be out of any domain at all. For example, userName() shows my local (Administrator) Windows username when I open Infopath XML data form from sharepoint form library of my Office 365 site. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/infopathdev/images/icon-quote.gif"&gt; &lt;strong&gt;Shrout1:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;Web enable the form so that they are filling it out with their domain credentials&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;&lt;p&gt;This wouldn&amp;#39;t enforce domain credentials since web enabled for can still be opened locally in client Filler with the same &amp;quot;local&amp;quot; username result:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;this, through client/Filler form opening, seems to always happen with me when I create a new XML data form in form library in Internet Explorer 8 (Office 365/Sharepoint Online), while in Mozilla Firefox it is opened in browser&lt;/li&gt;&lt;li&gt;a user can opt to explicitly open an existing form in a Filler (instead of a browser) on local machine&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Retrieve current user name through webservice</title><link>https://www.infopathdev.com:443/forums/thread/82590.aspx</link><pubDate>Wed, 12 Sep 2012 19:52:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:82590</guid><dc:creator>Shrout1</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/82590.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=82590</wfw:commentRss><description>&lt;p&gt;Just a real quick message in response to this (I know this topic is over two years old...) If you have a &amp;quot;filler&amp;quot; enabled form and your users are accessing the form via a different domain (I.E. they are using a home computer to fill out a form on a corporate server)&amp;nbsp;then **&lt;strong&gt;take note** &lt;/strong&gt;that &amp;quot;userName()&amp;quot; will return their *current* username. I.E. Bob, or Dad or Mary. NOT &amp;quot;john.q.public&amp;quot;. Best advice is to either&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;&amp;nbsp;Web enable the form so that they are filling it out with their domain credentials&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Use the &amp;quot;web services&amp;quot; method to return their domain account info - &lt;a href="http://blogs.microsoft.co.il/blogs/itaysk/archive/2007/04/05/InfoPath-_2D00_-Get-the-current-user-without-writing-code.aspx" target="_blank"&gt;tutorial here&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;</description></item><item><title>Re: Retrieve current user name through webservice</title><link>https://www.infopathdev.com:443/forums/thread/57319.aspx</link><pubDate>Fri, 23 Jul 2010 23:35:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:57319</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/57319.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=57319</wfw:commentRss><description>&lt;p&gt;The rule should go in your form&amp;#39;s Open rules (under form options for 2003 and 2007, under the Data tab for 2010). The condition for the rule should be &amp;quot;if the field that I&amp;#39;m going to put the user name in is blank&amp;quot; and the rule logic should do whatever needs to be done to get the user name (by IP 2007, we have the userName() function, which takes care of that). So, yes, the action would be to set a field&amp;#39;s value (the one you just checked to see if it was blank, and the value would be the userName function. &lt;/p&gt;</description></item><item><title>Re: Retrieve current user name through webservice</title><link>https://www.infopathdev.com:443/forums/thread/57238.aspx</link><pubDate>Fri, 23 Jul 2010 12:50:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:57238</guid><dc:creator>william_kreuder</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/57238.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=57238</wfw:commentRss><description>&lt;p&gt;Do you mean create a rule on the Current User Name field that states:&amp;nbsp; If Current User Name is = to &amp;quot;blank&amp;quot;?&lt;/p&gt;
&lt;p&gt;If so my question then is what action shoudl be run?&amp;nbsp; Set a fields value?&amp;nbsp; Thaks for the help!&amp;nbsp; &lt;/p&gt;</description></item><item><title>Re: Retrieve current user name through webservice</title><link>https://www.infopathdev.com:443/forums/thread/57213.aspx</link><pubDate>Thu, 22 Jul 2010 21:14:55 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:57213</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/57213.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=57213</wfw:commentRss><description>&lt;p&gt;Add a condition to your OnLoad rule that checks to see if the value is blank before running the query. &lt;/p&gt;</description></item><item><title>Re: Retrieve current user name through webservice</title><link>https://www.infopathdev.com:443/forums/thread/57203.aspx</link><pubDate>Thu, 22 Jul 2010 18:05:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:57203</guid><dc:creator>william_kreuder</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/57203.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=57203</wfw:commentRss><description>&lt;p&gt;Hello!&amp;nbsp; I am interested in how to fix this method so when I have my form submitted for approval, the name in the Current User Name field remains constant no matter whom the form is sent to. Thanks!&amp;nbsp; &lt;/p&gt;</description></item><item><title>Re: Retrieve current user name through webservice</title><link>https://www.infopathdev.com:443/forums/thread/32509.aspx</link><pubDate>Wed, 24 Sep 2008 13:09:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:32509</guid><dc:creator>DummyDumb</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/32509.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=32509</wfw:commentRss><description>&lt;p&gt;Got it now - thx :-)&lt;/p&gt;
&lt;p&gt;Doesn&amp;#39;t matter in my case, as I just need it for some code behind. Thanks for the clarification.&lt;/p&gt;
&lt;p&gt;DD&lt;/p&gt;</description></item><item><title>Re: Retrieve current user name through webservice</title><link>https://www.infopathdev.com:443/forums/thread/32507.aspx</link><pubDate>Wed, 24 Sep 2008 12:57:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:32507</guid><dc:creator>jrudolph</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/32507.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=32507</wfw:commentRss><description>&lt;p&gt;Based on what you have said I would assume that if User 1 fills out the form and submits/saves it, if User 2 opens User 1&amp;#39;s form it will trigger your rule&amp;nbsp;again, because unless you have code in the form or a control that you are using to indicate that the form was already created it will be triggered again. Becasue of this User 2&amp;#39;s name not User 1&amp;#39;s will be displayed.&lt;/p&gt;
&lt;p&gt;Now if there is never an instance where a different user will open User 1&amp;#39;s form, ie the form is meant to be filled out and then printed, then obviously this is not an issue. However if this form is meant to be filled out and then submitted to a&amp;nbsp;someone, like a superviosr for approval, then the rule will be triggered and enter the new User&amp;#39;s name as the current user. Test this by creating a form and saving it and then having a coworker open it.&lt;/p&gt;
&lt;p&gt;I brought this up because I&amp;nbsp;had&amp;nbsp;the&amp;nbsp;problem of users changing&amp;nbsp;when I first implemented the use of a webservice to pull the current users information, however instead of using a on open rule, I simply set the default value of the text box to the Users Name, using the method that you linked to in your first post,&amp;nbsp;and unchecked the &amp;quot;Update this value...&amp;quot; option, this way the text boxes default&amp;nbsp;value&amp;nbsp;only fired the first time the form was opened.&lt;/p&gt;</description></item><item><title>Re: Retrieve current user name through webservice</title><link>https://www.infopathdev.com:443/forums/thread/32503.aspx</link><pubDate>Wed, 24 Sep 2008 10:51:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:32503</guid><dc:creator>DummyDumb</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/32503.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=32503</wfw:commentRss><description>&lt;p&gt;Hello jrudolph,&lt;/p&gt;
&lt;p&gt;Sorry, but I don&amp;#39;t understand what you&amp;#39;re meaning - why should the submitter change, when the name of the current user is bound to a text box for display? &lt;/p&gt;</description></item><item><title>Re: Retrieve current user name through webservice</title><link>https://www.infopathdev.com:443/forums/thread/32461.aspx</link><pubDate>Tue, 23 Sep 2008 15:24:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:32461</guid><dc:creator>jrudolph</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/32461.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=32461</wfw:commentRss><description>&lt;p&gt;Just a quick comment. &lt;/p&gt;
&lt;p&gt;If the form is meant to be submitted you will probably want to use a different method, otherwise the submitted form will&amp;nbsp;replace the submitters name with&amp;nbsp;the reviewers name when&amp;nbsp;the form is being reviewed. This is an easy fix depening on what your needs are.&lt;/p&gt;</description></item><item><title>Re: Retrieve current user name through webservice</title><link>https://www.infopathdev.com:443/forums/thread/32447.aspx</link><pubDate>Tue, 23 Sep 2008 08:11:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:32447</guid><dc:creator>DummyDumb</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/32447.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=32447</wfw:commentRss><description>&lt;p&gt;Ok, I found a solution for the constant display of the administrator account problem. When a rule is assigned to a textbox, which retrieves the current user via the web service, the rule is executed exactly once (during the creation of the form). So if you create a form as an administrator and open the form as user X afterwards, the form still shows administrator. However when you alter the Tools/Form Options/ Open/Save settings and assign a rule to a textbox during form opening, the rule gets applied each time the form is opened resulting in a display of the &amp;quot;current&amp;quot; user.&lt;/p&gt;</description></item><item><title>Retrieve current user name through webservice</title><link>https://www.infopathdev.com:443/forums/thread/32427.aspx</link><pubDate>Mon, 22 Sep 2008 14:40:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:32427</guid><dc:creator>DummyDumb</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/32427.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=32427</wfw:commentRss><description>&lt;p&gt;According to several posts the current user name can be retrieved via the UserProfileService.asmx WebService (see &lt;a href="http://blogs.microsoft.co.il/blogs/itaysk/archive/2007/04/05/InfoPath-_2D00_-Get-the-current-user-without-writing-code.aspx"&gt;http://blogs.microsoft.co.il/blogs/itaysk/archive/2007/04/05/InfoPath-_2D00_-Get-the-current-user-without-writing-code.aspx&lt;/a&gt;). However no matter what user is logged in, I always get back the administrator user (I&amp;#39;ve found similar posts but no solution). Anybody who knows how this can be solved?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;DD&lt;/p&gt;</description></item></channel></rss>