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 / December 2005

Tip: Looking for answers? Try searching our database.

conditional formating

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike L - 09 Dec 2005 03:54 GMT
Anyone know if there a way to conditional format a field based on selections
from an options field within a repeating table?

I have a mutiple select list box created from options, repeating table and
scrolling region and I want to make a field read-only based on the selection
from this list.

Cheers
S.Y.M. Wong-A-Ton - 09 Dec 2005 11:11 GMT
You could use helper fields in the Main DOM or xdExtensions to set
conditional formatting on fields outside of the repeating table of your
multiple select list box, but the quickest and easiest way to set conditional
formatting is through an XPath expression in the Conditional Formatting
dialog box.

Try this:
1. Open the Conditional Format dialog box on the field you would like to
make read-only.
2. Select "Select a field or group…" in the first dropdown list and set it
to the node representing the option in your multiple select list box (in my
case this would be "selected" under the "option" group; see later in step 6)
3. Leave the default setting of the second dropdown unmodified
4. Select "TRUE" in the third dropdown list
5. Select "The expression" in the first dropdown list
6. Modify the XPath expression as follows:

If you want the field to be read-only when the second option in your
multiple select list box is selected, add a "[2]" behind the option group.
For example…

Expression before change:  my:options/my:option/my:selected = string(true())
Expression after change: my:options/my:option[2]/my:selected = string(true())

Note: You can add more conditions if your scenario requires it by clicking
on the [Add >>] button and selecting "and" or "or" from the list.

7. Select "Read-only" under "Then apply this formatting:"
8. Exit out by clicking on [OK] on all dialog boxes.

Hope this helps.

Regards,
S.Y.M. Wong-A-Ton

> Anyone know if there a way to conditional format a field based on selections
> from an options field within a repeating table?
[quoted text clipped - 4 lines]
>
> Cheers
Mike L - 12 Dec 2005 01:49 GMT
This is exactly what i was looking for. I didn't know you can reference them
like an array element. Thank you.

> You could use helper fields in the Main DOM or xdExtensions to set
> conditional formatting on fields outside of the repeating table of your
[quoted text clipped - 39 lines]
> >
> > Cheers
S.Y.M. Wong-A-Ton - 12 Dec 2005 07:37 GMT
You're welcome!

> This is exactly what i was looking for. I didn't know you can reference them
> like an array element. Thank you.
[quoted text clipped - 42 lines]
> > >
> > > Cheers
 
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.