<?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>Query List/Library using Code on a Web-Enabled Form</title><link>https://www.infopathdev.com:443/forums/thread/66988.aspx</link><pubDate>Tue, 31 May 2011 18:20:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:66988</guid><dc:creator>w2truong</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/66988.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=66988</wfw:commentRss><description>&lt;p&gt;So here is the situation, I have a SharePoint library of external content types which have a series of fields. Users are allowed to create new entries using a Web-Enabled InfoPath Form through SharePoint in a browser. But before the entry is created, it has to be cross-referenced with the library to make sure there are no conflicting schedules etc. There are three criteria: one is location, one is a datetime range (start date and end date) and the last is a series of numbers. The series of numbers is a repeating text field so when it is stored in SharePoint, it formats using space delimiters (i.e. &amp;quot;1 2 3&amp;quot;). I am using a Secondary Data Source to connect to the SharePoint library.&lt;/p&gt;&lt;p&gt;&amp;nbsp;I was able to successfully implement the first two criteria (location and datetime) using Default Value section and Insert Formulas (sample below):&lt;/p&gt;&lt;p&gt;Created[WorkAddress = Address and ((msxsl:string-compare(Event_Start_Date, addSeconds(_x007b_3db7d1b0_x002d_8673_x002d_4340_x002d_94e2_x002d_85023c183f1f_x007d_, -1800)) = -1 and msxsl:string-compare(Event_End_Date, addSeconds(_x007b_3db7d1b0_x002d_8673_x002d_4340_x002d_94e2_x002d_85023c183f1f_x007d_, -1800)) = 1) or (msxsl:string-compare(Event_Start_Date, addSeconds(_x007b_3db7d1b0_x002d_8673_x002d_4340_x002d_94e2_x002d_85023c183f1f_x007d_, -1800)) &amp;gt; -1 and msxsl:string-compare(Event_Start_Date, addSeconds(_x007b_3251b4e2_x002d_94b0_x002d_4f65_x002d_a2a1_x002d_3f9a76dc7cba_x007d_, 1800)) = -1))]&lt;/p&gt;&lt;p&gt;&amp;nbsp;Can anyone think of a way for me to implement the last criteria, the series of numbers? &lt;/p&gt;&lt;p&gt;Thank You,&lt;/p&gt;&lt;p&gt;p.s.&amp;nbsp;my description might be a little unclear so i will be glad to clarify if needed&lt;/p&gt;&lt;p&gt;p.s.s.&amp;nbsp;if&amp;nbsp;my default value formula returns multiple rows/values from my Secondary Data Source, is there a way for me to count/display the number of rows/results returned? I know that it will only display one result in the field, but it would be nice to know if there were actually multiple results.&lt;/p&gt;</description></item></channel></rss>