Rule isn't setting a field's value when data is populated from external source in conditionfield - InfoPath Dev
in

InfoPath Dev

Rule isn't setting a field's value when data is populated from external source in conditionfield

Last post 11-14-2011 10:28 AM by karson6. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 11-14-2011 07:49 AM

    Rule isn't setting a field's value when data is populated from external source in conditionfield

    I have a rule set up under a field called Current Appraised Value that states: When Appraised Value > 0 then set the Current Loan/AV% field to Current Principal/Appraised Value. But when the form is generated and the Current Appraised Value field is populated by an another datasource, the Current Loan/AV% field is blank.  If the user manually overkeys the Appraised Value field with the same value that was populated, then the calculation is performed.  

    It seems like InfoPath is not recognizing that a value was populated in the Current Appraised Value field unless a user manually keys the data. 

    What do I need to add to the rule so the rule is performed upon form generation using an external data source? 

    Thanks! 

     


     

  • 11-14-2011 08:45 AM In reply to

    Re: Rule isn't setting a field's value when data is populated from external source in conditionfield

    Is the Appraised Value field in a secondary data source?

    When those initially load, they aren't considered "changed", so rules set on them don't fire. I'd add a rule to form load (if the data source loads when the form opens) to set the Current Appraised Value, or whereever else may be appropriate for your form's logic (that is, if the form queries that data source at a specific point, then add the rule there)

    Hilary Stoupa

  • 11-14-2011 09:02 AM In reply to

    Re: Rule isn't setting a field's value when data is populated from external source in conditionfield

    Yes, Appraised Value in in the secondary data source.  When the form loads, it is populated with system data from this source.  I added the same rule to the form load.

    When I tested it, instead of  the Current Loan/AV% field being blank, it now has NaN populated within it.  Any idea what NaN is or where it would come from?

    I appreciate your help, Hilary. 

     

     

  • 11-14-2011 09:18 AM In reply to

    Re: Rule isn't setting a field's value when data is populated from external source in conditionfield

    NaN = Not a number.

    Do both Current Principle and Appraised Value have values? Did you add the same condition as to Appraised Value being > 0?

    You can modify your rule to set the field to just the value of Appraised Value, and then just the value of Current Principle, so you can see what those values are when your form opens, that may help you troubleshoot.

    Hilary Stoupa

  • 11-14-2011 10:28 AM In reply to

    Re: Rule isn't setting a field's value when data is populated from external source in conditionfield

    It works!  Thanks for your help, Hilary!

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