Populate values using information realted to another field.

D

dsc2bjn

I wish to display as read-only a list of values which is derived from a
drop-down menu in a field.

Example:

Office -- drop down menu item.
Unit -- retrieve a list of Units based up on the Office selected.

I do not want to retrieve the Units as part of a cascading list box. The
user will not be making a selction for the Unit. All Units for the Office
should be displayed on the form. The display of the Unit is more of an
informational type to let the user know which Units will be included in the
data collection.
 
S

S.Y.M. Wong-A-Ton

Use a listbox and bind it to the same source as the drop-down box, but use
the "Filter Data" option on the listbox to filter the items in the listbox by
the value selected in the drop-down box. Then use conditional formatting to
disable the listbox by adding a condition like 1=1 (use "The expression"
option from the first drop down list box on the conditional formatting dialog
box and type in the expression 1=1 yourself) and choosing "Disable this
control".
 
D

dsc2bjn

I am having a difficult time with the filter.

I created the Office(s) and for each Office there are one or more (Units)
under them as a repeating data source.

Office 1
Unit1
Unit 2

etc.

in the datasource for the page it is listed as:

+ Office
+AU

I can return the full list of "AU", but have not found the filter function
to bring back only the list of "AU" for each Office. I haven't used
InfoPath long enough to figure out its schema for filtering.

I tried:
/my:myFields/my:Offices_AUs/my:AU[. = ..]
/my:myFields/my:Offices_AUs/my:AU[. = ../my:Offices]
Offices_AUs[Assessible_Units = AU]
/my:myFields/my:Offices_AUs/my:AU[. = "Office.AU"]


I can't seem to find anything that will allow me to return the AUs for each
Office.
 
S

S.Y.M. Wong-A-Ton

When you're on the Properties dialog box for the list box and you are going
to set up the data source for it, you click on the "Select XPath" button
behind the "Entries" field. This opens up the "Select a Field or Group"
dialog box. In the bottom left corner of this dialog box there is a button
called "Filter Data...". Use this button to set up a filter for which entries
are ultimately shown in the list box.
---
S.Y.M. Wong-A-Ton


dsc2bjn said:
I am having a difficult time with the filter.

I created the Office(s) and for each Office there are one or more (Units)
under them as a repeating data source.

Office 1
Unit1
Unit 2

etc.

in the datasource for the page it is listed as:

+ Office
+AU

I can return the full list of "AU", but have not found the filter function
to bring back only the list of "AU" for each Office. I haven't used
InfoPath long enough to figure out its schema for filtering.

I tried:
/my:myFields/my:Offices_AUs/my:AU[. = ..]
/my:myFields/my:Offices_AUs/my:AU[. = ../my:Offices]
Offices_AUs[Assessible_Units = AU]
/my:myFields/my:Offices_AUs/my:AU[. = "Office.AU"]


I can't seem to find anything that will allow me to return the AUs for each
Office.



S.Y.M. Wong-A-Ton said:
Use a listbox and bind it to the same source as the drop-down box, but use
the "Filter Data" option on the listbox to filter the items in the listbox by
the value selected in the drop-down box. Then use conditional formatting to
disable the listbox by adding a condition like 1=1 (use "The expression"
option from the first drop down list box on the conditional formatting dialog
box and type in the expression 1=1 yourself) and choosing "Disable this
control".
 
D

dsc2bjn

I have it working. I used the Cascading list box method described on the
On-line help.

THANKS!!

S.Y.M. Wong-A-Ton said:
When you're on the Properties dialog box for the list box and you are going
to set up the data source for it, you click on the "Select XPath" button
behind the "Entries" field. This opens up the "Select a Field or Group"
dialog box. In the bottom left corner of this dialog box there is a button
called "Filter Data...". Use this button to set up a filter for which entries
are ultimately shown in the list box.
---
S.Y.M. Wong-A-Ton


dsc2bjn said:
I am having a difficult time with the filter.

I created the Office(s) and for each Office there are one or more (Units)
under them as a repeating data source.

Office 1
Unit1
Unit 2

etc.

in the datasource for the page it is listed as:

+ Office
+AU

I can return the full list of "AU", but have not found the filter function
to bring back only the list of "AU" for each Office. I haven't used
InfoPath long enough to figure out its schema for filtering.

I tried:
/my:myFields/my:Offices_AUs/my:AU[. = ..]
/my:myFields/my:Offices_AUs/my:AU[. = ../my:Offices]
Offices_AUs[Assessible_Units = AU]
/my:myFields/my:Offices_AUs/my:AU[. = "Office.AU"]


I can't seem to find anything that will allow me to return the AUs for each
Office.



S.Y.M. Wong-A-Ton said:
Use a listbox and bind it to the same source as the drop-down box, but use
the "Filter Data" option on the listbox to filter the items in the listbox by
the value selected in the drop-down box. Then use conditional formatting to
disable the listbox by adding a condition like 1=1 (use "The expression"
option from the first drop down list box on the conditional formatting dialog
box and type in the expression 1=1 yourself) and choosing "Disable this
control".
---
S.Y.M. Wong-A-Ton


:

I wish to display as read-only a list of values which is derived from a
drop-down menu in a field.

Example:

Office -- drop down menu item.
Unit -- retrieve a list of Units based up on the Office selected.

I do not want to retrieve the Units as part of a cascading list box. The
user will not be making a selction for the Unit. All Units for the Office
should be displayed on the form. The display of the Unit is more of an
informational type to let the user know which Units will be included in the
data collection.
 

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