Calculating with dates in Repeating Tables - InfoPath Dev
in

InfoPath Dev

Calculating with dates in Repeating Tables

Last post 09-24-2006 08:20 AM by trufooser. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 09-20-2006 07:19 AM

    • bbujak
    • Not Ranked
    • Joined on 09-05-2006
    • Posts 3

    Calculating with dates in Repeating Tables

    I have a form with a repeating table. The form is also has an access database as its data source.
    There is a week ending field in a repeating section. Within that repeating section is a repeating table which has a field start date.
    I need to validate whether the start date is <= Week Ending date and >= Week Ending Date - 6.
    I can validate the first part but not the Week Ending Date - 6.
    I realize that this will have to be done in code, but my problem is that I have trouble identifying the current row of the repeating table in code. It always seems to calculate using the fields in the first row. I use VBScript.
    Please help.
    Thanks....Beth
  • 09-21-2006 12:19 AM In reply to

    Re: Calculating with dates in Repeating Tables

    Hi Beth,
    Unfortunately, you have to use code to do this. Take a look at the js code in the Timesheet (Detailed) sample. It has code to calculate the totals I think (see common.js). Good luck!
    Patrick Halstead
    Project Manager at Qdabra
  • 09-24-2006 08:20 AM In reply to

    Re: Calculating with dates in Repeating Tables

    I posted a formula around here for an age calculator. Instead of calculating number of years, you could change it to number of days. Subtract Today() from your field and if its >= 6 it fails. Do a search for Age Calculation or Age Calculator, youll find the thread.
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.