InfoPath – Add Sequential Dates

In the past, I needed to add a date sequentially on insert of a repeating table.

I found a post by S.Y.M Wong-A-Ton that helped me achieve this.  Here is a link to that post: http://www.bizsupportonline.net/infopath2007/automatically-populate-repeating-table-infopath-sequential-dates.htm

If you are working on anything InfoPath, this site is a GREAT resource.  I highly suggest that you check it out.

I have included a sample form for you to download.  You can add this control to any of your existing forms.  Here are the steps for re-creating this from scratch

  1. Add a group
  2. Add a repeating group
  3. Add two fields:  date picker and text fieldField 1 (date picker control)
    Field 2 (text control)
  4. Right click on field2 and insert the following statement in the value box
    preceding-sibling::group2[1]/field1

Make sure to change the field names if different than the ones in your form.

Here is the form you can download by clicking.  AddSequentialDates

InfoPath – Difference between days

I had a request for a form to count the number of days between two date pickers as one of it’s functions.  All that you need to make this happen is add two date picker controls and one text field to display the count.  I have included an InfoPath sample form that explains this in detail and should provide you with the knowledge to add something like this to one of your forms.

I originally found this form on the following site when I faced this issue: https://alecpojidaev.wordpress.com/2008/12/30/infopath-codeless-programming-walkthrough-2/

Alec Pojidaev has many great techniques for using no code solutions which I am a big fan of.  I suggest you check out his site to see all of the advanced features he has laid out.

Click the link below to download the zip file.

DifferenceBetween2Days