A
abc
My question has to do with the entry below. I followed the
instructions below and it worked perfectly. My question now is I need
to create a "department" named GENERIC.. when GENERIC is selected it
displays the ENTIRE division list (includes all the divisions existing
from that table).. sort of like the "master list".
Does anyone have any suggestions? I'm connected to an access db.
Thanks!
-------------------------
Question:
I have two dropdown boxes and in the first I have it populated with the
departments within our company. Because some of our departments have
divisions I would like to dispay onlys those divisions based on a
selected
department.
-------------------------
Answer:
So for example our department Cusomnter Servces has three divisions,
Furniture, Print and Equipment. So if an employee selects Customer
Services
another dropdown list appears displaying thre three divisions or sub
departments. Obviously, if a department selected does not have sub
departments the next box need no appear.
1) Create a new, blank InfoPath form
2) Add a drop-down list to the form named: ddlSuppliers
3) Add a drop-down list to the form named: ddlProducts
4) Add a new "Receive" data connection (Tools->Data Connections) to the
Northwind database using the Suppliers table. (Note: you will only need
the
SupplierID and CompanyName fields.)
5) Add a new "Receive" data connection (Tools->Data Connections) to the
Northwind database using the Products table. (Note: you will only need
the
ProductID, ProductName and SupplierID fields.)
6) Right-click on ddlSuppliers and choose Properties
7) On the Data tab select the option "Look up values in a data
connection
to a database..." under the section "List Box Entries"
8) Set the Data Connection to Suppliers
9) Click the button next to the Entries box, highlight "d:Suppliers"
and
click OK
10) Leave the Value field as: @SupplierID
11) Click the button next to Display name, highlight CompanyName and
click
OK
12) Click OK to close the Properties window
13) Right-click on ddlProducts and choose Properties
14) On the Data tab select the option "Look up values in a data
connection
to a database..." under the section "List Box Entries"
15) Set the Data Connection to Products
** NOTE: These next steps are important for the filtering! **
16) Click the button next to the Entries box, highlight "droducts"
and
click the Filter Data button
17) Click Add
18) In the first box, select SupplierID
19) In the second box, select "Is Equal To"
20) In the third box, choose Select a Field or Group
21) From the Data Source box choose Main
22) Highlight ddlSuppliers and click OK
23) Click OK three times to get back to the Properties window
24) Leave the Value field as: @ProductID
25) Click the button next to Display name, highlight ProductName and
click
OK
26) Click OK to get back to your form
** NOTE: These next steps are important for clearing out the previous
entries in ddlProducts once a new selection is made from ddlSuppliers!
**
27) Right-click on ddlSuppliers and choose Properties
28) Click the Rules button
29) Click Add
30) Click Add Action
31) From the Action box choose Set a field's value
32) Click the button next to Field, select ddlProducts and click OK
33) Leave the Value field blank
34) Click OK four times to get back to your form
35) Preview your form and make a selection from ddlSuppliers - you
should
only see a few items in the Products list.
36) Make a different selection from ddlSuppliers - you should now have
a
different list of Products!
Is this possible?
instructions below and it worked perfectly. My question now is I need
to create a "department" named GENERIC.. when GENERIC is selected it
displays the ENTIRE division list (includes all the divisions existing
from that table).. sort of like the "master list".
Does anyone have any suggestions? I'm connected to an access db.
Thanks!
-------------------------
Question:
I have two dropdown boxes and in the first I have it populated with the
departments within our company. Because some of our departments have
divisions I would like to dispay onlys those divisions based on a
selected
department.
-------------------------
Answer:
So for example our department Cusomnter Servces has three divisions,
Furniture, Print and Equipment. So if an employee selects Customer
Services
another dropdown list appears displaying thre three divisions or sub
departments. Obviously, if a department selected does not have sub
departments the next box need no appear.
1) Create a new, blank InfoPath form
2) Add a drop-down list to the form named: ddlSuppliers
3) Add a drop-down list to the form named: ddlProducts
4) Add a new "Receive" data connection (Tools->Data Connections) to the
Northwind database using the Suppliers table. (Note: you will only need
the
SupplierID and CompanyName fields.)
5) Add a new "Receive" data connection (Tools->Data Connections) to the
Northwind database using the Products table. (Note: you will only need
the
ProductID, ProductName and SupplierID fields.)
6) Right-click on ddlSuppliers and choose Properties
7) On the Data tab select the option "Look up values in a data
connection
to a database..." under the section "List Box Entries"
8) Set the Data Connection to Suppliers
9) Click the button next to the Entries box, highlight "d:Suppliers"
and
click OK
10) Leave the Value field as: @SupplierID
11) Click the button next to Display name, highlight CompanyName and
click
OK
12) Click OK to close the Properties window
13) Right-click on ddlProducts and choose Properties
14) On the Data tab select the option "Look up values in a data
connection
to a database..." under the section "List Box Entries"
15) Set the Data Connection to Products
** NOTE: These next steps are important for the filtering! **
16) Click the button next to the Entries box, highlight "droducts"
and
click the Filter Data button
17) Click Add
18) In the first box, select SupplierID
19) In the second box, select "Is Equal To"
20) In the third box, choose Select a Field or Group
21) From the Data Source box choose Main
22) Highlight ddlSuppliers and click OK
23) Click OK three times to get back to the Properties window
24) Leave the Value field as: @ProductID
25) Click the button next to Display name, highlight ProductName and
click
OK
26) Click OK to get back to your form
** NOTE: These next steps are important for clearing out the previous
entries in ddlProducts once a new selection is made from ddlSuppliers!
**
27) Right-click on ddlSuppliers and choose Properties
28) Click the Rules button
29) Click Add
30) Click Add Action
31) From the Action box choose Set a field's value
32) Click the button next to Field, select ddlProducts and click OK
33) Leave the Value field blank
34) Click OK four times to get back to your form
35) Preview your form and make a selection from ddlSuppliers - you
should
only see a few items in the Products list.
36) Make a different selection from ddlSuppliers - you should now have
a
different list of Products!
Is this possible?