Dynamic Values

J

Jono

My form has a billing section that has many items. Each of these items has a
check box before it and a text box after it. These item text boxes show the
value of the item and retrieve that value from a source text box elsewhere in
the form.

What I'm able to do is that if the item check box is not selected the item
text box value is 0 and if the check box is selected the item value is the
same
as the source value. What I'm having a problem with is that these selected
item text box values are static...If the source value changes after the
check box is checked the item text box value does not change.

How do I get a dynamic value in the item text boxes when the corresponding
check box is selected?

I'm using Infopath 2003
 
S

S.Y.M. Wong-A-Ton

Since you want the items to react to the changes in the source text boxes,
you'd have to add rules to the source text boxes, and use conditions on these
rules to check whether the check boxes are selected before the rules set the
values of the items. Hopefully your items are not located in a repeating
section or table, so that you can use rules to set the values of the items,
otherwise you'd have to write code.
 
J

Jono

Thanks for the response.

Well the source-text-boxes are located inside a repeating section so I
figured I would have problems getting rules to run properly there. I also
don't know how to write code so that was a deadend, but you got me thinking
and I did come up with a solution. What I needed was a value that would
update and run a rule to keep the value-text-boxes updated. So I left the
rules on the check-boxes to initially set the value-text-box values and then
created a running total fo all the source-text-boxes and placed rules on it
that would check to see if it were greater than 0 and that the check-box was
checked and if so set the value-text-box value to equal the source-text-box.
Hope that makes sense and thanks again!
 
S

S.Y.M. Wong-A-Ton

No worries. I cannot really follow the solution you came up with, but am
happy you found it and it works for you. Well done!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top