problem refreshing field value when data changes - InfoPath Dev
in

InfoPath Dev

problem refreshing field value when data changes

Last post 05-15-2009 03:40 PM by JackieR. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 05-14-2009 04:36 PM

    problem refreshing field value when data changes

    Hi,

    I'm very new to Infopath and all things related to programming, databases, etc. So please bare with me...Here's my scenario:

    I have created a "request for expenditure"  form template. The form includes the following fields:

    • expense request amount
    • Timing Code (when the expense is expected to occur in the year)
    • Expense request schedule: January, February, March, April....December (each month = 1 field)

     The task is to distribute the amount in the "expense request amount"  field amongst the "months" fields based on the "timing code". for example: expense amount of $1000.00 spread evenly between Jan,Feb,Mar,Apr would be: January=$250, February=$250, march=$250 and April=$250.

    To do this I have setup a number of rules in the "timing code" field which are set to caluculate and populate the values in the "months" fields based on the amount in the "expense request amount" field. This seems to work fine (so long as infopath can handle as many as 90 rule sets in one field??? - anyone know of  a limit here?).

    This works fine too when the user changes/or selects a different "timing code" - the rules still reclaculate the "Month" fields. However my problem occurs when the user changes the "expense request amount" field - the "month" fields do not update with the new value.

    How do i do this?

    Your help is very much appreciated here

    Thanks so much

    Desperate

     

     

     

     

     

     

     

     

     

     

  • 05-14-2009 06:04 PM In reply to

    Re: problem refreshing field value when data changes

    Hi, and welcome!

    I fear you'll have to also put rules on the 'expense request amount' field. Rules are bound to a field and fire when that field changes.... so there are no rules firing when the 'expense request amount' field changes.

    You could put all your rules that set the month values on an entirely different field and have rules on 'month' and 'expense request amount' to change that field when either of them change, thus firing the ruleset... since you only have two fields involved, and already have your 90 rules on the one field, this probably won't really save you any time / effort.

    I do not know of a rule limit in InfoPath.

    Hilary Stoupa

  • 05-15-2009 01:14 PM In reply to

    Re: problem refreshing field value when data changes

    Thank you so much Hilary for your response.

    It was very helpful and i have since been able to correct my problem by adding rules to the 'expense reqest amount' field. However since I only have a handfull of rules setup (not the 90 rules I will need to add once I've worked out all the kinks), I also tried to follow your second suggestion to have all the rules in a seperate field. I can set the "month" fields to populate based on my new field, but I'm not able to figure out how to set the "expense request amount" field and the "timing code" field to fire a rule set when either of them change. Is there a special formula I'm missing?

    Thanks again!

  • 05-15-2009 01:33 PM In reply to

    Re: problem refreshing field value when data changes

    I've attached a simple sample form that might explain this better than I can. To use it, right click on the link in the header of this message and select 'Save as' and save the file locally. Right click the file and select design to open in design mode... Check the rules on the first two fields and the 'toggle' field...

    Hilary Stoupa

  • 05-15-2009 03:40 PM In reply to

    Re: problem refreshing field value when data changes

    Ah ha! Problem solved!

    Thank you again for your valuable help.

    Best regards

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