Text box link and generate specific time - InfoPath Dev
in

InfoPath Dev

Text box link and generate specific time

Last post 02-11-2007 04:47 AM by Evert. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 02-04-2007 09:26 AM

    • Evert
    • Not Ranked
    • Joined on 02-04-2007
    • Posts 3

    Text box link and generate specific time

    Maybe somebody can help me out with the following. I am a newbie and know almost nothing of InfoPath 2003. I was starting with it because I need a form to make a part of my work easier. My question is the following. I am building a Video conference request form. I have made 2 text boxes, one called Time CET and the other Dial in time. For both in the textbox properties I have made the Data type time.

    What I want is the following. The user fills out Time CET and automatically the dial in time appears but 15 minutes before the dial in time. For example Time CET is 14.20 hours then the dial in time will be automatically 14.05. Sorry if my English isn#%92t correct but I am from the Netherlands

  • 02-06-2007 04:07 PM In reply to

    Re: Text box link and generate specific time

    Hi Evert and welcome to the forums!

    On the OnAfterChange event of the field that the user inputs to, try this code:
    DateTime f1 = DateTime.Parse(e.Source.text);
    DateTime f2 = f1.AddMinutes(-15);

    thisXDocument.DOM.selectSingleNode("/my:myFields/my:field2").text = f2.ToShortTimeString();
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 02-08-2007 07:46 AM In reply to

    • Evert
    • Not Ranked
    • Joined on 02-04-2007
    • Posts 3

    Re: Text box link and generate specific time

    Hi Matt,
    Thanks for your welcome and your help. Tommorow I am working with Infopath and I am gonna let you know if your code is working.
  • 02-11-2007 04:47 AM In reply to

    • Evert
    • Not Ranked
    • Joined on 02-04-2007
    • Posts 3

    Re: Text box link and generate specific time

    Thanks again for your help Matt, the form is working correctly with your code
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.