Refreshing xpath calculations - InfoPath Dev
in

InfoPath Dev

Refreshing xpath calculations

Last post 03-12-2012 02:36 AM by Kazzahere. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 03-05-2012 01:34 AM

    Refreshing xpath calculations

    Hi

    I have a form with numerous rules and xpath calculations. How can I ensure that the final figure is correct as I have found that if a entry is changed that the totals do not update.

    For example

    the user completes No_of_copies

    the Price is hidden

    they are provided with a total - No_of_copies * Price.

    If they then change No_of_copies the total does not update.

    I looked at adding a refresh button but this appears to only be for data connections.

    Thanks in advance

    Karen

    Filed under: , ,
  • 03-05-2012 08:21 AM In reply to

    Re: Refreshing xpath calculations

     On your fields, there should be a checkbox that allows the calculated value to refresh. Have you tried this?


    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 03-06-2012 01:42 AM In reply to

    Re: Refreshing xpath calculations

    Hi

    Thanks for your response.

    Yes that is ticked but some of the calculations work on rules rather than directly in the control properties.

    Thanks

    Karen

  • 03-06-2012 04:44 AM In reply to

    Re: Refreshing xpath calculations

    If certain calculations are set up via rules, then you'll need to make sure that the rules are triggered every time they are needed. For example:

    field3 = field2 * field1

    If you have a rule on field1 that performs the multiplication, then you also need the same rule on field2. The reason is that you never know whether the user will enter the value for field1 or field2 first.

    You can extend this to other scenarios. For example, if a field is calculated as a result of 3 other fields, all three of the fields will need the calculation rules set up.

    Hope this helps.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 03-08-2012 02:32 AM In reply to

    Re: Refreshing xpath calculations

    That's great thanks.

    Any idea regarding check boxes? If a check box is marked then a rule goes off an does some calculations, if they then untick the box the total does not update (deduct the calculation).

     Thanks, really appreciate your help.

  • 03-09-2012 08:09 AM In reply to

    Re: Refreshing xpath calculations

     You would need two rules with opposite conditions in the checkbox, I think.

    One rule for "checkbox is true" and one rule for "Checkbox is false". Can you try that?

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 03-12-2012 02:36 AM In reply to

    Re: Refreshing xpath calculations

    Thank you, thank you, thank you.

    I added a false rule that set the field to blank which worked perfectly.

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