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

Tip: Looking for answers? Try searching our database.

Check if List Box is populated

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Martyn Lawson - 10 Nov 2005 16:24 GMT
Hi,

I have a drop-down list box that is linked to a secondary datasource.
However, the secondary datasource is not connected until a button is pressed.

I would like to be able to perform some conditional formatting on a second
button depending on whether the drop-down list contains any options (not
whether it has a selected value).

Is this possible? Alternatively, is it possible to see whether a datasource
is connected?

Any suggestions would be greatly appreciated,

Cheers,
Martyn...
S.Y.M. Wong-A-Ton - 10 Nov 2005 20:30 GMT
Hi Martyn,

Have you already tried counting the nodes in the secondary data source using
the XPath count() function?

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

> Hi,
>
[quoted text clipped - 12 lines]
> Cheers,
> Martyn...
Martyn Lawson - 14 Nov 2005 10:05 GMT
Hi,

Thanks for your response. How is this possible using conditional formatting?
There isn't an option to count a datasource node.

Cheers,
Martyn...

> Hi Martyn,
>
[quoted text clipped - 20 lines]
> > Cheers,
> > Martyn...
S.Y.M. Wong-A-Ton - 14 Nov 2005 10:51 GMT
Hi Martyn,

You can set conditional formatting on the button and use "The Expression" in
the Conditional Format dialog box to use the XPath count() function. You will
have to modify the expression yourself, though.

Try this:
- Open the Conditional Format dialog box
- Click on [Add...]
- In the Conditional Formatting dialog box: Leave the field in the first
dropdown selected
- Leave "is equal to" in the second dropdown selected
- Select "Select a field or group" from the third dropdown
- Select a field (e.g. an ID field) from the secondary datasource you are
using to fill the dropdown on your IP form and click on [OK]
- Back in the Conditional Format dialog box: Select "The expression" from
the first dropdown
- Modify the expression in textbox to perform formatting if the datasource
contains nodes as follows:
Old expression: my:field1 = xdXDocument:GetDOM("...")/....
New expression: count(xdXDocument:GetDOM("...")/....) > 0
- Apply the desired formatting for the button
- Click on [OK] to close all dialog boxes

Hope this helps.

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

> Hi,
>
[quoted text clipped - 28 lines]
> > > Cheers,
> > > Martyn...
 
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.