<?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>SharePoint Integration</title><link>https://www.infopathdev.com:443/forums/46.aspx</link><description> For questions concerning issues in the integration of SharePoint and Microsoft InfoPath.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Using current date to query a SharePoint list</title><link>https://www.infopathdev.com:443/forums/thread/103981.aspx</link><pubDate>Tue, 15 Sep 2015 20:26:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:103981</guid><dc:creator>tictag</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/103981.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=103981</wfw:commentRss><description>Hello clever people, newbie on the forum. I&amp;#39;ve searched around but found nothing specific to this so here goes...

I would like to populate an InfoPath data field with an item from a SharePoint list filtered using a query based on the current date. That really was a mouthful, let me explain:

SharePoint List:

FROM              TO                  PERIOD
01/01/2015    31/01/2015    Period 1
01/02/2015    28/02/2015    Period 2
...

Let&amp;#39;s say the current system date is: 12/2/2015, when the form loads a field stored within a SharePoint list integrated repeating table field group  is automatically populated with, in this case, &amp;quot;Period 2&amp;quot;.

Ultimately, this is going to be a very simple timesheet entry form that carers within a care agency can go online and enter non-care hours, such as training, office support and so on. The data stored will be extracted monthly and used to pay the staff for these extra hours. This will be used forever and a day where each row is a number of hours for a particular type of work, which means that I must be able to filter the extracted data based on pay period. I don&amp;#39;t want to risk &amp;#39;garbage in&amp;#39; by just asking the carer to enter the &amp;#39;current pay period&amp;#39; or worse, have to manipulate/transform the extracted data.

What I know:
  - I can use the &amp;#39;now()&amp;#39; function to return the current system date &amp;amp; time and store this in a field using the &amp;#39;Set a field&amp;#39;s value&amp;#39; rule action
  - I can use rules to set the query field for a SharePoint list data connection, then use &amp;#39;Query for data&amp;#39; to extract that data on demand
  - I can filter the returned data using the &amp;#39;filter data&amp;#39; feature of &amp;#39;Select a Field or Group&amp;#39; whilst using a formula for a field&amp;#39;s value.

I think I have all the components but I just can&amp;#39;t work out how to bring them all together to populate the field.

I&amp;#39;m using InfoPath 2013 and and Office 365 instance of Sharepoint Server 2013.

Any and all help would be met with smiles and adulation :)

David.</description></item></channel></rss>