Execute the same rules on differents controls

A

Alvin

I have a form that has 12 rows. On each row i have 3 dropdown lists and 1
text box. I want to set the text box field based on the values selected on
the 3 dropdown. I know how to set the value on tlhe text box using rules.
The problem is that I have multiples rules (17 to be exact) on the third
dropdown (the one i use to set the text box value) I used the same rules for
each row.

Do I have to set all 17 rules on each third dropdown list for every row?????

Example of rules: if x=1 and y=1 and z= 1 or 2 or 3; set value to "Low"
Thanks for the help
 
G

Greg Collins [InfoPath MVP]

Rules are tied to a particluar node, not a control. This is different than conditional formatting, and filters which are tied to a control.

Thus once you place rules on the first control bound to a particular node, all controls bound to the same node will have the same rules.

Hope this helps.
 
A

Alvin

Sorry. Don't know much about nodes and code on infopath. Only have basic
knowledge on programming language. How do I bound the control to that node?
 
G

Greg Collins [InfoPath MVP]

When you drag a field (i.e. XML node) from your data source task pane into the view, you've just created a "binding" between the control (text box, drop-down list box, etc) and the node.

The node is the field in your data source task pane. It is there that rules are saved... not on the individual controls in the view.

So if you drag into the view a text box for field1, there is a text box control bound to the field1 XML node. If you add rules to this text box control, you are really adding them to the field1 XML node. Thus, if you drag in a second text box for field1, that second text box already has those same rules. Why? Because the rules do not belong to the control, but to the node.
 
A

Alvin

Ok, i got it. I tried what you said, it works in that case. But then I will
have duplicate data on those 2 fields. Also when I selected a value it will
be the same for both controls. I don't want this. If I change the binding
then I will lose the rules.

Is there a workaround for this?
Thanks for your help....
 
G

Greg Collins [InfoPath MVP]

So it sounds like what you want is different controsl bound to different nodes, but both having the same (or similar rules).

There's no simple way to copy rules from one control to another. If you had a higher comfort level with InfoPath, XML and XPath, I would suggest you could do some edits directly in the manifest file... but that can be risky at best unless you really know what you are doing.

No, I'm afraid the slow, tedious process of duplicating rules across controls bound to separate nodes is the only solution here.
 
A

Alvin

That's what I thought. Ok, thanks a lot for your time and support. Keep the
excellent work.
 

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