Stuck in recursive deadlock Situation - InfoPath Dev
in

InfoPath Dev

Stuck in recursive deadlock Situation

Last post 07-16-2013 03:29 AM by zeeshan. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 07-12-2013 02:06 AM

    Stuck in recursive deadlock Situation

    Hi there, I am a newbie in Infopath Custom code development. So unable to figure this one out by myself. Will you please provide suggestions? Problem statement: I have textbox which takes % value as an input. And I am calculating percentage and displaying it in another textbox. This part works fine. But I want to do reverse of that as well. It's like when I change textbox value then accordingly it should calculate and update % field as well. I am writing conditions on Changed event of textbox. Can anybody help me with this? Thanks in advance.
  • 07-12-2013 11:28 AM In reply to

    Re: Stuck in recursive deadlock Situation

    You shouldn't need code to do this. The way you can do this is:

    1. Create a field called Calculating with the default value false (preferably this would be in a secondary data source, but you can put it in the main data source if you're not sure how to do that
    2. Put a rule on the Percent field as follows:
      Condition: Calculating is not equal to true
      Actions:
      1. Set Calculating = "true"
      2. Set Otherfield = Value * Percent
      3. Set Calculating =  "false"
    3. Put a rule on the Otherfield field as follows:
      Condition: Calculating is not equal to true
      1. Set Calculating = "true"
      2. Set Percent = Otherfield div Value
      3. Set Calculating = "false"

    And that should do it.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 07-16-2013 03:29 AM In reply to

    Re: Stuck in recursive deadlock Situation

    Thank you very much Jimmy. Thanks for your time and reply. This really helps me to solve my problem.
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.