Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / February 2007

Tip: Looking for answers? Try searching our database.

Execute the same rules on differents controls

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alvin - 12 Feb 2007 18:49 GMT
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
Signature

Do or Do Not...there is no try

Greg Collins [InfoPath MVP] - 12 Feb 2007 20:19 GMT
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.

Signature

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

Alvin - 13 Feb 2007 13:46 GMT
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?
Signature

Do or Do Not...there is no try

> 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.
Greg Collins [InfoPath MVP] - 13 Feb 2007 14:05 GMT
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 )

Alvin - 13 Feb 2007 14:32 GMT
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 )

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.