<?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: Creating a sign off button</title><link>https://www.infopathdev.com:443/forums/thread/34930.aspx</link><pubDate>Wed, 26 Nov 2008 08:07:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34930</guid><dc:creator>Anuma</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34930.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=34930</wfw:commentRss><description>&lt;p&gt;Are you using full trust form?&lt;/p&gt;
&lt;p&gt;This code is working for me in a normal form.&lt;/p&gt;</description></item><item><title>Re: Creating a sign off button</title><link>https://www.infopathdev.com:443/forums/thread/34616.aspx</link><pubDate>Thu, 20 Nov 2008 16:32:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34616</guid><dc:creator>Zombie8</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34616.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=34616</wfw:commentRss><description>&lt;p&gt;Thank you Anuma for the code snippet to work with. When i add this code to my infopath .cs form i get Security Exceptions(System.Security.SecurityExceptions to be exact) thrown on the following lines:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&amp;nbsp; &lt;font size="2" color="#008080"&gt;&lt;font size="2" color="#008080"&gt;XPathNavigator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; xnDateTime = xn.SelectSingleNode(&lt;/font&gt;&lt;font size="2" color="#800000"&gt;&lt;font size="2" color="#800000"&gt;&amp;quot;/my:myFields/my:field1&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font size="2" color="#0000ff"&gt;&lt;font size="2" color="#0000ff"&gt;this&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.NamespaceManager);&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font size="2" color="#008080"&gt;&lt;font size="2" color="#008080"&gt;&amp;nbsp; XPathNavigator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; xnUserName = xn.SelectSingleNode(&lt;/font&gt;&lt;font size="2" color="#800000"&gt;&lt;font size="2" color="#800000"&gt;&amp;quot;/my:myFields/my:field2&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font size="2" color="#0000ff"&gt;&lt;font size="2" color="#0000ff"&gt;this&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.NamespaceManager);&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Do I have to create a certificate for this source to run on my machine? From your experience what are we looking at for my users who use this infopath form? Is there a work around just so that I can test it? Is there an alternative solution for having to have a signed certificate for this form? &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Creating a sign off button</title><link>https://www.infopathdev.com:443/forums/thread/34554.aspx</link><pubDate>Thu, 20 Nov 2008 07:53:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34554</guid><dc:creator>Anuma</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34554.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=34554</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Double click on the button and click on &amp;quot;EditFormCode&amp;quot; button. Copy Paste the below code.&lt;/p&gt;&amp;nbsp;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;XPathNavigator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; xn = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.MainDataSource.CreateNavigator();&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;XPathNavigator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; xnDateTime = xn.SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;/my:myFields/my:field1&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.NamespaceManager);&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; currentDate = &lt;/font&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;DateTime&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.Now.ToString(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;yy-mm-ddThh-mm-ss&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;xnDateTime.SetValue(currentDate);&lt;/p&gt;&lt;/font&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;XPathNavigator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; xnUserName = xn.SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;/my:myFields/my:field2&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.NamespaceManager);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; currentUser = System.&lt;/font&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;Environment&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.UserName.ToString();&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;xnUserName.SetValue(currentUser);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Field1 ---&amp;gt; Datetime field&lt;/p&gt;
&lt;p&gt;Field2 ---&amp;gt; Username field.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;If you want to display the only time in the Datetime field, then use below code:&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;font size="2"&gt; currentDate = &lt;/font&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;DateTime&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.Now.ToString(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;hh:mm:ss&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: Creating a sign off button</title><link>https://www.infopathdev.com:443/forums/thread/34543.aspx</link><pubDate>Thu, 20 Nov 2008 06:05:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34543</guid><dc:creator>Rajitha</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34543.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=34543</wfw:commentRss><description>&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;"&gt;&lt;font face="Calibri" size="3"&gt;Hi,&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;"&gt;&lt;font face="Calibri" size="3"&gt;You can set username to textbox by using following code. Write this in button onclick event.&lt;/font&gt;&lt;/p&gt;&lt;span style="FONT-SIZE:10pt;LINE-HEIGHT:115%;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-no-proof:yes;"&gt;SetNodeValue(“/my:myFields/my:field1”,System.&lt;span style="COLOR:teal;"&gt;Environment&lt;/span&gt;.UserName);&lt;/span&gt; 
&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;"&gt;&lt;span style="mso-no-proof:yes;mso-bidi-font-family:&amp;#39;Courier New&amp;#39;;"&gt;&lt;font face="Calibri" size="3"&gt;Use conditional format on button so that if all the text boxes are not blank then disable button.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;"&gt;&lt;span style="mso-no-proof:yes;mso-bidi-font-family:&amp;#39;Courier New&amp;#39;;"&gt;&lt;font face="Calibri" size="3"&gt;Here field1 is textbox control.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;"&gt;&lt;font face="Calibri" size="3"&gt;Hopes this helps.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Creating a sign off button</title><link>https://www.infopathdev.com:443/forums/thread/34530.aspx</link><pubDate>Wed, 19 Nov 2008 21:56:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34530</guid><dc:creator>Zombie8</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34530.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=34530</wfw:commentRss><description>&lt;p&gt;Hi all,&lt;/p&gt;&lt;p&gt;&amp;nbsp;I am creating an infopath 2007 form that my users will fill out and submit to a WSS 3.0 (not a MOSS portal site) site. The form will have a section for the user to click a button and sign off on the form. The functionality I am trying to accomplish is the following:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Click on a button to sign off on the infopath form&lt;/li&gt;&lt;li&gt;The button will add the users name (preferably first and last) into a text box&lt;/li&gt;&lt;li&gt;The button will also add the current time into a text box&lt;/li&gt;&lt;li&gt;The button will become disabled and the textboxes will be read-only.&amp;nbsp;&amp;nbsp;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;I should also mentioned that I am creating a &amp;quot;managed code&amp;quot; form with Visual Studio 2005. &lt;/p&gt;&lt;p&gt;&amp;nbsp;My struggles have been:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Getting the User Name to even display&lt;/li&gt;&lt;li&gt;Understanding the life cycle of an infopath form.&amp;nbsp;&amp;nbsp;&lt;/li&gt;&lt;/ol&gt;Any help would be greatly appreciated, or some guidance as to whether or not what I am trying to accomplish can be pulled off in sharepoint.&lt;br /&gt;</description></item></channel></rss>