<?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: AutoFill</title><link>https://www.infopathdev.com:443/forums/thread/13117.aspx</link><pubDate>Thu, 30 Sep 2004 19:08:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13117</guid><dc:creator>BrownR</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13117.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13117</wfw:commentRss><description>Thanks Greg. I just removed the "New Record" for the time being. It created a hassle with something else, that i cant remember so it'll be on the back burner for now. I have it set to make a new record everytime they open the form. Or do a search if they like.</description></item><item><title>Re: AutoFill</title><link>https://www.infopathdev.com:443/forums/thread/13116.aspx</link><pubDate>Thu, 30 Sep 2004 17:26:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13116</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13116.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13116</wfw:commentRss><description>Because you are doing a query, you are clearing out all the data that was stored previously under dsf:dataFields.&lt;br /&gt;&lt;br /&gt;The best thing for you to do is to store a copy of the user name in code, and then have an OnAfterChange event handler for the @Login field, which will populate it from the variable when it gets recreated (via query or anything else).&lt;br /&gt;&lt;br /&gt;Greg Collins [InfoPath MVP]</description></item><item><title>AutoFill</title><link>https://www.infopathdev.com:443/forums/thread/12413.aspx</link><pubDate>Fri, 17 Sep 2004 20:48:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12413</guid><dc:creator>BrownR</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12413.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12413</wfw:commentRss><description>Ok i have this script in my Onload function.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;function XDocument::OnLoad(eventObj)&lt;br /&gt;{&lt;br /&gt;	&lt;br /&gt;	var objWscript;&lt;br /&gt;	//Pull the info from the machine&lt;br /&gt;	objWscript = new ActiveXObject("WScript.Network");&lt;br /&gt;	//Combine the login to the hidden text box.&lt;br /&gt;	XDocument.DOM.selectSingleNode("//dfs:myFields/dfs:dataFields/d:ReportInfo/@Login").text= objWscript.UserName;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;	&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Im trying to get a textbox to autofill with the user sign in name. It does just that and works fine until they do a search/query or clicks on new form. It then turns blank and no longer has the users name in that spot. I would like it to have it at any time that name will be in the box. So if they open the IP and starts to add a file it will auto fill and if they query and then click on new record it will then also autofill.</description></item></channel></rss>