Hello clever people, newbie on the forum. I'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'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, "Period 2".
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't want to risk 'garbage in' by just asking the carer to enter the 'current pay period' or worse, have to manipulate/transform the extracted data.
What I know:
- I can use the 'now()' function to return the current system date & time and store this in a field using the 'Set a field's value' rule action
- I can use rules to set the query field for a SharePoint list data connection, then use 'Query for data' to extract that data on demand
- I can filter the returned data using the 'filter data' feature of 'Select a Field or Group' whilst using a formula for a field's value.
I think I have all the components but I just can't work out how to bring them all together to populate the field.
I'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.