Manipulating Values: Works for one, but not the other - InfoPath Dev
in

InfoPath Dev

Manipulating Values: Works for one, but not the other

Last post 08-22-2008 12:26 PM by e_stylzz. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 08-20-2008 07:31 AM

    Manipulating Values: Works for one, but not the other

    I have a dropdown list, where if it changes from a specific value to another, certain things happen.  For example

    The StartDate value is set to the value of the EndDate and the EndDate clears. 

    Well, I wanted to do a similar thing with a Rate field and Old Rate field. Code for both:

    thisXDocument.DOM.selectSingleNode("/my:myFields/my:ddlEngagementType/@my:bEngagementType").text = "true";

    thisXDocument.DOM.selectSingleNode("/my:myFields/my:dpStart").text = thisXDocument.DOM.selectSingleNode("/my:myFields/my:dpEnd").text;

    thisXDocument.DOM.selectSingleNode("/my:myFields/my:dpEnd").text = "";

    thisXDocument.DOM.selectSingleNode("/my:myFields/my:tbBillRateOld").text = thisXDocument.DOM.selectSingleNode("/my:myFields/my:tbBillRate").text;

    thisXDocument.DOM.selectSingleNode("/my:myFields/my:tbBillRate").text = "";

     

    The date changes work, but the rates do not.  Any ideas?   Thanks,

    Eric

  • 08-20-2008 10:37 PM In reply to

    Re: Manipulating Values: Works for one, but not the other

    Hi,

    You can try this with rules. I think no need of code.

    Put a Rule on drop down by setting the field values.

    I hope it will work for you.

     

    Swathip
    www.ggktech.com
  • 08-21-2008 12:45 AM In reply to

    • totoen
    • Not Ranked
    • Joined on 08-12-2008
    • Posts 7

    Re: Manipulating Values: Works for one, but not the other

    Hi,

     You can try with this at the end of the code:

    thisXDocument.View.ForceUpdate();

  • 08-22-2008 12:26 PM In reply to

    Re: Manipulating Values: Works for one, but not the other

     What I did to fix:

     Since the date worked, i swapped the order in my code to do the bill rates first then the dates just for giggles.  This time it produceded an error about my tbBillRateOld being null.  I put a value the textbox and it worked.  So, i just set a default value for the textbox and all is well.  Thank you for everyone that read this and offered suggestions.

     

    Eric

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