Calculations to a Date Picker - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Calculations to a Date Picker

Last post 05-12-2010 08:13 AM by jhelfrich. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 05-11-2010 03:20 PM

    Calculations to a Date Picker

    All I want to do is have a date picker set to returns todays date and add 6 weeks to it automatically when a new form is created. So if they fill out a new form on 5/11/2010...I want the date picker to show 6/22/2010 with the ability to edit the date before submission.

  • 05-11-2010 04:37 PM In reply to

    Re: Calculations to a Date Picker

    Can you access the node that stores the date and use a .setvalue(DateTime.Today.AddDays(42));

     

    Maybe behind the form_load event?

     

    Bryan Strader
    Software Developer
  • 05-11-2010 10:37 PM In reply to

    Re: Calculations to a Date Picker

    create a field say firsttime, initially it will be blank.

    on open and save write a rule

    if firsttime is blank 

    set the value of your calendar control to addDays(today(), 42)

    set firstvalue  to "secondtime"

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 05-12-2010 07:45 AM In reply to

    Re: Calculations to a Date Picker

    I am unable to create a rule on open, this is a browser compatible form.

  • 05-12-2010 07:54 AM In reply to

    Re: Calculations to a Date Picker

     Browser compatible forms should be able to use Form Open rules.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 05-12-2010 08:13 AM In reply to

    Re: Calculations to a Date Picker

    Actually....I got it.

    I inserted a date picker labeled projectDueDate and set the value for today().

    Created a rule with the condition that if projectDueDate is equal to today() Set that fields value to addDays(today(), 42)

    That works.

     

    Thanks to all for input!

Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.