<?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: grabbing values from a repeating table &amp; comparing them with non-repeating fields</title><link>https://www.infopathdev.com:443/forums/thread/53500.aspx</link><pubDate>Thu, 08 Apr 2010 21:25:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53500</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53500.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=53500</wfw:commentRss><description>&lt;p&gt;You are correct that your current architecture would require pulling down at least the start and end date for all your list items. If you anticipate this list getting big, you are smart to be thinking about future performance now.&lt;/p&gt;
&lt;p&gt;You could create a secondary data source connection to the list, and not query on load, then use a CAML query to see if any item exists in the list that matches the start and end date from your form. &lt;a href="http://www.u2u.be/Res/Tools/CamlQueryBuilder.aspx"&gt;U2U CAML Query Builder&lt;/a&gt; can help you get an idea of what the CAML will need to look like.&lt;/p&gt;</description></item><item><title>Re: grabbing values from a repeating table &amp; comparing them with non-repeating fields</title><link>https://www.infopathdev.com:443/forums/thread/53479.aspx</link><pubDate>Thu, 08 Apr 2010 13:18:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53479</guid><dc:creator>zach8202</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53479.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=53479</wfw:commentRss><description>&lt;p&gt;Thanks, I&amp;#39;ll check out nodeiterator&lt;/p&gt;
&lt;p&gt;The first two values, start1, end1 are from the main datasource. The user picks a start &amp;amp; end date from dropdown lists - start1/end1 are non-repeating.&lt;/p&gt;
&lt;p&gt;Start2 and end2 are from the secondary datasource and are repeating.&lt;/p&gt;
&lt;p&gt;When the user picks a start &amp;amp; end time, I am wanting to take those values and compare them to the secondary datasource. &lt;/p&gt;
&lt;p&gt;So if the user picked a time that overlaps with a start/end in the secondary datasource, infopath will tell them so through validation, switching view, etc.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; Actually, I&amp;#39;m not sure xpathnodeiterator and checking against the secondary datasource will be the way to go. I&amp;#39;m assuming if I do this that means I&amp;#39;ll be retreiving the entire list every time someone opens the form, killing performance (right?). Should I be using the Sharepoint API to iterate through the list items instead so it&amp;#39;s processed on the server? What do you think?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;</description></item><item><title>Re: grabbing values from a repeating table &amp; comparing them with non-repeating fields</title><link>https://www.infopathdev.com:443/forums/thread/53452.aspx</link><pubDate>Wed, 07 Apr 2010 22:45:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53452</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53452.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=53452</wfw:commentRss><description>&lt;p&gt;Hi--&lt;/p&gt;
&lt;p&gt;You need to loop through all the nodes checking against the start and end dates. An XPathNodeIterator will help you here.&lt;/p&gt;
&lt;p&gt;Looking at your code, though, it looks like your start and end date are in different groups? Are both groups repeating?&lt;/p&gt;
&lt;p&gt;Hmmmm.... Looking more closely, it appears that you are selecting these start and end dates from the main data source? But aren&amp;#39;t they in a different data source, a secondary data source?&lt;/p&gt;</description></item><item><title>grabbing values from a repeating table &amp; comparing them with non-repeating fields</title><link>https://www.infopathdev.com:443/forums/thread/53442.aspx</link><pubDate>Wed, 07 Apr 2010 20:41:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53442</guid><dc:creator>zach8202</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53442.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=53442</wfw:commentRss><description>&lt;p&gt;(i am making a simple room booking form) What i want to do is this:&lt;/p&gt;
&lt;p&gt;The user picks a start and end date/time, then the date/time is displayed in non-repeating fields like this: 2010-04-07 12:30:00&lt;/p&gt;
&lt;p&gt;I need to take the user specified start &amp;amp; end date/times, and check to see if those times conflict with any of the times that have already been submited to the calendar library.&lt;/p&gt;
&lt;p&gt;My problem is how do i get all of the current calendar event start &amp;amp; end dates so I can compare them to what the user picked?&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s what I&amp;#39;ve got so far:&lt;/p&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;XPathNavigator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; root = MainDataSource.CreateNavigator();&lt;/font&gt;&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; startdate1_RnRCompare = root.SelectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;my:myFields/my:startdate1&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;NamespaceManager).Value;&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; enddate1_RnRCompare = root.SelectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;my:myFields/my:enddate1&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;NamespaceManager).Value;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;//Here&amp;#39;s&amp;nbsp;the spot where i&amp;#39;m having trouble, I know grabbing a single node won&amp;#39;t work....so what shall I do instead?&lt;/strong&gt;&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; startdate2_RnRCompare = root.SelectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;dfs:myFields/dfs:dataFields/dfs:Conference_Room_Reservations/@startdate2&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;NamespaceManager).Value;&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; enddate2_RnRCompare = root.SelectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;dfs:myFields/dfs:dataFields/dfs:Reservations/@enddate2&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;NamespaceManager).Value;&lt;/p&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;DateTime&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; start1 = &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;Convert&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.ToDateTime(startdate1_RnRCompare);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;DateTime&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; end1 = &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;Convert&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.ToDateTime(enddate1_RnRCompare);&lt;/p&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;DateTime&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; start2 = &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;Convert&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.ToDateTime(startdate2_RnRCompare);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;DateTime&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; end2 = &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;Convert&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.ToDateTime(enddate2_RnRCompare);&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;//my date comparison function below&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; test = (!((end2 &amp;lt; start1) || (start2 &amp;gt; end1))).ToString();&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;//and here i&amp;#39;ll do something with it&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/font&gt;&lt;font size="2"&gt;&lt;/p&gt;&lt;/font&gt;</description></item></channel></rss>