<?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: Want to SUBMIT form with the contents of 2 fields from the form.</title><link>https://www.infopathdev.com:443/forums/thread/29642.aspx</link><pubDate>Mon, 23 Jun 2008 18:38:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29642</guid><dc:creator>barmatt80</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29642.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=29642</wfw:commentRss><description>&lt;p&gt;there is a way to ensure that they use it, but I did it via code, not by rules.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I had a date picker that would check the day of the week, and that returned an integer.&amp;nbsp; That integer is zero based, meaning 0 corresponds to Sunday.&amp;nbsp; I am sure 0 would correspond to Sunday in the US time, not sure about other countries.&amp;nbsp; Then I used a case statement to check it as Saturday(my day of the week needed).&amp;nbsp; Then assign the text name of the day to text box.&amp;nbsp; Then in rules I put a rule that said if the text was not equal to Saturday, then show message adn reset all fields.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Here it is in vb that is backward compatible with infopath 2003.&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;If&lt;/font&gt;&lt;font size="2"&gt; thisXDocument.DOM.selectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;/dfs:myFields/my:Week/my:WeekBeginning&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;).text &amp;lt;&amp;gt; &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Then&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;font size="2"&gt; strDate &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;String&lt;/font&gt;&lt;font size="2"&gt; = thisXDocument.DOM.selectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;/dfs:myFields/my:Week/my:WeekBeginning&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;).text&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;font size="2"&gt; dt &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;New&lt;/font&gt;&lt;font size="2"&gt; DateTime&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;dt = DateTime.Parse(strDate)&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;font size="2"&gt; strDayID &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;String&lt;/font&gt;&lt;font size="2"&gt; = dt.DayOfWeek&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;font size="2"&gt; strDayofWeek &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;String&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Select&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Case&lt;/font&gt;&lt;font size="2"&gt; strDayID&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Case&lt;/font&gt;&lt;font size="2"&gt; 0&lt;/p&gt;
&lt;p&gt;strDayofWeek = &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;Sunday&amp;quot;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Case&lt;/font&gt;&lt;font size="2"&gt; 1&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;strDayofWeek = &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;Monday&amp;quot;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Case&lt;/font&gt;&lt;font size="2"&gt; 2&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;strDayofWeek = &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;Tuesday&amp;quot;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Case&lt;/font&gt;&lt;font size="2"&gt; 3&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;strDayofWeek = &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;Wednesday&amp;quot;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Case&lt;/font&gt;&lt;font size="2"&gt; 4&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;strDayofWeek = &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;Thursday&amp;quot;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Case&lt;/font&gt;&lt;font size="2"&gt; 5&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;strDayofWeek = &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;Friday&amp;quot;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Case&lt;/font&gt;&lt;font size="2"&gt; 6&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;strDayofWeek = &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;Saturday&amp;quot;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Case&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Else&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;strDayofWeek = &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;Sunday&amp;quot;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;End&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Select&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;thisXDocument.DOM.selectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;/dfs:myFields/my:DayyOfweek&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;).text = strDayofWeek&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;End&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;If&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;nbsp;&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: Want to SUBMIT form with the contents of 2 fields from the form.</title><link>https://www.infopathdev.com:443/forums/thread/29641.aspx</link><pubDate>Mon, 23 Jun 2008 17:07:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29641</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29641.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=29641</wfw:commentRss><description>&lt;p&gt;I can&amp;#39;t think of a way to do that with data validation -- even if you format the field to display the day of the week the value of the field will be the date. It could be done with code, of course, if you are not adverse to that approach.&lt;/p&gt;</description></item><item><title>Re: Want to SUBMIT form with the contents of 2 fields from the form.</title><link>https://www.infopathdev.com:443/forums/thread/29640.aspx</link><pubDate>Mon, 23 Jun 2008 16:49:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29640</guid><dc:creator>adubyailkinson</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29640.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=29640</wfw:commentRss><description>&lt;p&gt;No no, that was a very helpful tip as well!! Thanks! Now, is there a way through data validation that I can force people to use a date that is a certain day of the week (friday)?&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Want to SUBMIT form with the contents of 2 fields from the form.</title><link>https://www.infopathdev.com:443/forums/thread/29637.aspx</link><pubDate>Mon, 23 Jun 2008 16:33:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29637</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29637.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=29637</wfw:commentRss><description>&lt;p&gt;Whoops! I see I was a bit late to the party! :)&lt;/p&gt;</description></item><item><title>Re: Want to SUBMIT form with the contents of 2 fields from the form.</title><link>https://www.infopathdev.com:443/forums/thread/29636.aspx</link><pubDate>Mon, 23 Jun 2008 16:31:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29636</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29636.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=29636</wfw:commentRss><description>&lt;p&gt;Hello:&lt;/p&gt;
&lt;p&gt;You can do this using the concat function to concatenate your fields (along with the .xml extension) and translate to remove the dashes from the date. Select the Insert Formula button next to the text box for the name. In the Insert Formula window, select Insert Function. From the available Text functions, select concat. The first field would be your office field. After the comma, select Insert Function again, and this time select translate from the available Text functions. The translate function takes three arguments. First is the field you wish to translate (in your case, the date field). Second is the string you wish to translate (here it is the &amp;quot;-&amp;quot;). And, finally, the replacement string. We want to replace the dashes with nothing, so we use blank quotes. After another comma, add the file extension. Your finished formula will look like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;concat(&lt;u&gt;office&lt;/u&gt;, translate(&lt;u&gt;date&lt;/u&gt;, &amp;quot;-&amp;quot;, &amp;quot;&amp;quot;), &amp;quot;.xml&amp;quot;)&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;And the result should be the file name format you were looking for.&lt;/p&gt;</description></item><item><title>Re: Want to SUBMIT form with the contents of 2 fields from the form.</title><link>https://www.infopathdev.com:443/forums/thread/29635.aspx</link><pubDate>Mon, 23 Jun 2008 16:12:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29635</guid><dc:creator>adubyailkinson</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29635.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=29635</wfw:commentRss><description>&lt;p&gt;Great idea! Thanks! Doing this helped me figure out what I needed:&lt;/p&gt;&lt;p&gt;I clicked the Fx button:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;concat(&lt;u&gt;office&lt;/u&gt;,&lt;u&gt;reportDate&lt;/u&gt;)&amp;nbsp;&lt;/p&gt;&lt;p&gt;I guess I was trying to do this from the wrong place before. The hidden field trick will come in handy too, I am sure.&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Want to SUBMIT form with the contents of 2 fields from the form.</title><link>https://www.infopathdev.com:443/forums/thread/29634.aspx</link><pubDate>Mon, 23 Jun 2008 16:03:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29634</guid><dc:creator>barmatt80</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29634.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=29634</wfw:commentRss><description>&lt;p&gt;How I usually handle this is using a hidden field on the form to concat all the information I want and then add that single field to the file name in the data connection.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Ex. Text box named FileName.&amp;nbsp; On the submit button I would put a rule that said if this field is not blank, then set FileName to this value. Something like concat(&lt;u&gt;Field1&lt;/u&gt;, &lt;u&gt;Field2&lt;/u&gt;).&amp;nbsp; Then my next step in my submit button would be the actual submit to sharepoint on if FileName was not blank.&lt;/p&gt;</description></item><item><title>Re: Want to SUBMIT form with the contents of 2 fields from the form.</title><link>https://www.infopathdev.com:443/forums/thread/29630.aspx</link><pubDate>Mon, 23 Jun 2008 15:50:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29630</guid><dc:creator>adubyailkinson</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29630.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=29630</wfw:commentRss><description>&lt;p&gt;Cheers &lt;b&gt;barmatt80,&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;/b&gt;I am trying to simply do it without code, I&amp;#39;m in the Data Connection Wizard, and am adding a &amp;quot;submit data&amp;quot; connection. It&amp;#39;s being submitted to a SharePoint library (that works). I am trying to populate the File Name field with some contents that the user fills out in the form. &lt;br /&gt;&lt;br /&gt;I can successfully insert ONE FIELD but what I want is to include 2 fields, and that&amp;#39;s where I get the error. &lt;/p&gt;&lt;p&gt;Ex: I click on the Fx box, and it&amp;#39;ll pull the field names and underline them- just won&amp;#39;t validate.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Want to SUBMIT form with the contents of 2 fields from the form.</title><link>https://www.infopathdev.com:443/forums/thread/29628.aspx</link><pubDate>Mon, 23 Jun 2008 15:44:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29628</guid><dc:creator>barmatt80</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29628.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=29628</wfw:commentRss><description>&lt;p&gt;My first question is why use code?&amp;nbsp; I ask because this can all be accomplished using some simple rules within infopath.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Also the incrementing number would have to be saved in a list or database field.&amp;nbsp; A new form would be opened, query that field, add 1 to it, then save it back.&amp;nbsp; I just did that in an access database but saved the number as an integer, and then did format(FIELD, &amp;quot;00000&amp;quot;) to get the correct format for use in the filename.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I don&amp;#39;t know javascript, but I might be able to find some in vb.net&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Want to SUBMIT form with the contents of 2 fields from the form.</title><link>https://www.infopathdev.com:443/forums/thread/29622.aspx</link><pubDate>Mon, 23 Jun 2008 15:16:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29622</guid><dc:creator>adubyailkinson</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29622.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=29622</wfw:commentRss><description>&lt;p&gt;Seems simple, I just can&amp;#39;t quite get the syntax right. One field is a drop down, the other is a date.&lt;/p&gt;&lt;p&gt;&lt;u&gt;Field 1:&lt;/u&gt;&amp;nbsp;&amp;nbsp; AA &lt;/p&gt;&lt;p&gt;&lt;u&gt;Field 2:&lt;/u&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 06/23/2008 - or whatever format dates are stored&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;AA20080623.xml&lt;/b&gt; is pretty much what I would like the final name to be...something like that.&lt;/p&gt;&lt;p&gt;I&amp;#39;ve tried: &lt;b&gt;office.date&lt;/b&gt; by adding the fields and &lt;b&gt;office&amp;amp;date&lt;/b&gt; as well as others.&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>