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.

Signature
Greg Collins [Microsoft MVP]
Visit Braintrove ( http://www.braintrove.com )
Visit InfoPathDev ( http://www.InfoPathDev.com )
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....

Signature
Do or Do Not...there is no try
> 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.
Greg Collins [InfoPath MVP] - 15 Feb 2007 21:58 GMT
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.

Signature
Greg Collins [Microsoft MVP]
Visit Braintrove ( http://www.braintrove.com )
Visit InfoPathDev ( http://www.InfoPathDev.com )
Alvin - 16 Feb 2007 12:22 GMT
That's what I thought. Ok, thanks a lot for your time and support. Keep the
excellent work.

Signature
Do or Do Not...there is no try
> 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.
Greg Collins [InfoPath MVP] - 19 Feb 2007 17:10 GMT
No problem. Glad to help.

Signature
Greg Collins [Microsoft MVP]
Visit Braintrove ( http://www.braintrove.com )
Visit InfoPathDev ( http://www.InfoPathDev.com )