<?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: Set the value of a feild on submit.</title><link>https://www.infopathdev.com:443/forums/thread/65181.aspx</link><pubDate>Tue, 15 Mar 2011 14:12:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:65181</guid><dc:creator>ashoke</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/65181.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=65181</wfw:commentRss><description>&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;"&gt;&lt;font face="Calibri" size="3"&gt;Hi There - You are right. Access db formatting gets the right number of digits on submission but it doesn&amp;#39;t appear on the InfoPath query form. The form takes actual number with no leading zero if you try to view it in any way either by text box or expression box. Interestingly, the Access report view takes the formatting with the leading zeros which was my prediction that it would work for InfoPath query form as well. You can run a query using another text field that will take values from this field with added sets of rules. &lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;"&gt;&lt;font face="Calibri" size="3"&gt;Say for example, you&amp;#39;ve created ID field in the Access db AutoNumber and getting number such as ...., 7, 8, 9, 10, 11. It doesn&amp;#39;t matter whether you&amp;#39;ve formatted in db or not. It also doesn&amp;#39;t matter whether you show it on your input form or not. Because this ID field as AutoNumber&amp;nbsp;will get its value in db automatically. To view the ID field in the desired format, you can create another field. Say this is ID_F. Note that as a requirement that this field is to be in the Access db. &lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;"&gt;&lt;font face="Calibri" size="3"&gt;In text box properties dialogue box&amp;nbsp;of the ID_F: Data tab: Value fx box will be @ID. Click the Rules button and set the rules as follows: &lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;"&gt;&lt;font face="Calibri" size="3"&gt;Rule 1: Condition: ID &amp;lt; 10 and Action: =fx Set a field&amp;#39;s value, Field: &lt;u&gt;.&lt;/u&gt; , Value: concat(&amp;quot;000000000&amp;quot;, @ID) or whatever the number of zeros required.&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;"&gt;&lt;font face="Calibri" size="3"&gt;Rule 2: Condition: ID&amp;nbsp;&amp;gt;= 10 and Action: =fx Set a field&amp;#39;s value, Field: &lt;u&gt;.&lt;/u&gt; , Value: concat(&amp;quot;00000000&amp;quot;, @ID). There is one zero less as the ID digit is increasing by one digit. &lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;"&gt;&lt;font face="Calibri" size="3"&gt;And so on. &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 add comma if you want. &lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;"&gt;&lt;font face="Calibri" size="3"&gt;I would prefer to make the field read-only on Display tab of the text box properties dialogue box.&lt;/font&gt;&lt;/p&gt;&lt;font face="Calibri" size="3"&gt;Thanks,&lt;/font&gt;&lt;font face="Calibri" size="3"&gt;Ash&lt;/font&gt;</description></item><item><title>Re: Set the value of a feild on submit.</title><link>https://www.infopathdev.com:443/forums/thread/65124.aspx</link><pubDate>Sun, 13 Mar 2011 23:27:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:65124</guid><dc:creator>xjoutsider</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/65124.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=65124</wfw:commentRss><description>&lt;p&gt;I changes the formating in the access Db of the ID feild.&amp;nbsp;to get the value correct but it&amp;nbsp;does not transfer to the form. how&amp;nbsp;do you get the formatting to transfer to the form when queried.&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Set the value of a feild on submit.</title><link>https://www.infopathdev.com:443/forums/thread/64921.aspx</link><pubDate>Mon, 07 Mar 2011 15:43:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:64921</guid><dc:creator>ashoke</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/64921.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=64921</wfw:commentRss><description>&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;"&gt;&lt;font face="Calibri" size="3"&gt;Hi, Hope you have got the solution from previous post. But I would prefer following simple solution which is a kind of same thing:&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;"&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;Access AutoNumber field Format&amp;nbsp;to &amp;quot;0000000000&amp;quot;. It keeps the length of the field 10 digits long from right keeping the leading zeros.&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;"&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;You do not need to create an InfoPath form field/node or you can create a read only field (I prefer to make it visible to the users).&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;"&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;Thanks,&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;"&gt;&lt;font face="Calibri" size="3"&gt;Ash&lt;/font&gt;&lt;/p&gt;</description></item><item><title>Re: Set the value of a feild on submit.</title><link>https://www.infopathdev.com:443/forums/thread/64864.aspx</link><pubDate>Mon, 07 Mar 2011 09:34:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:64864</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/64864.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=64864</wfw:commentRss><description>&lt;p&gt;You can certainly set it to a value in the form (latter approach) or submit to Access and requery to get the ID, set the field&amp;nbsp;and submit again.&lt;/p&gt;</description></item><item><title>Re: Set the value of a feild on submit.</title><link>https://www.infopathdev.com:443/forums/thread/64852.aspx</link><pubDate>Sat, 05 Mar 2011 20:04:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:64852</guid><dc:creator>xjoutsider</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/64852.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=64852</wfw:commentRss><description>&lt;p&gt;Or could this be&amp;nbsp;set &amp;nbsp;with the defualt field value of Customer ID &amp;nbsp;&lt;/p&gt;</description></item><item><title>Set the value of a feild on submit.</title><link>https://www.infopathdev.com:443/forums/thread/64850.aspx</link><pubDate>Sat, 05 Mar 2011 13:55:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:64850</guid><dc:creator>xjoutsider</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/64850.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=64850</wfw:commentRss><description>&lt;p&gt;I want to set the value of my Customer ID on submit&amp;nbsp; of the form. I would like to use auto ID generated by Access + leading zeros. In excel I could do it like this =RIGHT(&amp;quot;0000000000&amp;quot;&amp;amp;B1,6). I am not sure how it would look in InfoPath.&amp;nbsp; So on submit it should submit 000001 to the database once to 10 it would be 000010 and so on. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>