Drop-Down from a SharePoint List

D

Daniel

Hello.-

I'm trying to use DropDown list box from a Sharepoint list that have two
columns:
User Name & Email

The Idea is when a filler-user select an user name from the list I get as
value the email, because later I will send an email for all the selected
users (the drop down is in a repeting section).

My problem is associated to the fact that the DropDown list only allow to
use a single SharePoint column and this is also the only that can be used as
both: Display and Value for that list. I'm evaluating to use two DropDown
lists and syncronize it.

Have somebody an idea about how to syncronize two DropDown List?
Have somebody an idea about an alternative to resolve this issue?

Thanks

Daniel
 
D

Daniel

Thanks Jake.

I follow the instructions of the article about filters but doesn't work,
anyway I read a lot of posted subjects in this forum about the same problem
(with variants), and I conclude that I was using the worng strategy. Link two
Dropdown Lists are not necesary the best solution in my case.

I just want to select a user name and know their email address. In my WSS
site I have a List whre you have associted in each row the User Name and
Email for that user. So I think to put in a single repeting section two
controls:

1) DropDown List (DDL) associated to a secondary data source that reads the
user name from WSS, in this connection I also have the email field but this
cannot be used by display or value attribute in the DDL if I already use the
username in that control.

2) A simple text box.

Making a mind merge of all the posted comments in this forum about the
problem I follow the next steps:

In the DDL properties create a new rule.
For this new rule I add a new action.
The action was Set a field's value.
In the Field box I add the prevoius created text box. I use for this the
main data source.
In the value fiel I select Insert a Field or Group and swith the Data Source
to the secondary data source that actually is populting the DDL, but instead
to select the user name field I use the email (remeber bout are in the same
WSS List).
Later select the Filter Data Button and add a new filter.
The filter was associated to a expression @email[. = current()].
I click OK in all open dialogs.

Unfortunally that fails.

Have an idea about how to improve this exercise?

I will appreciate any help
 
J

Jake

Daniel,

This scheme will not work with a text box control since you can't have it
lookup values from your WSS list. You need the 2nd control to be a DDL also.
I suspect the problem you were having with making this work is that you
didn't change the Data Source of the 2nd control.

Here is an example:

I have a WSS list which has columns for Sales rep name, telephone #, sales
id#, email address.

I have a DDL control with a data connection to my WSS list, looking up data
from the "Sales Rep Name" column.

I have DDL controls for telephone #, sales id#, & email address. I set each
of these controls to look up values to that same data connection. Under
Entries, I select the appropriate column where the matching data is found in
the WSS list (telephone #, etc..) I do *not* put any filters on these
controls.

Going back to the DDL control for the "Sales Rep Name", I now create a rule
to set the value for all the other fields. It is here where you must setup
the filter to have the correct value populate. To autopopulate the correct
"email address", I not only have to select the correct column here from WSS
data connection, but I must click the 'filter data' button and add a filter
that says display the data for "Email address in the WSS list *where* "Sales
Rep Name" from my main data source is equal to the value of "Sales Rep Name"
from my secondary data source (the WSS list). This drives the correct data to
be displayed.

Now, when a user selects "Sales Rep Name" from the DDL, the rest of their
information is automatically populated on the other DDL's.

Hope this helps clarify. Thanks,
-Jake





Daniel said:
Thanks Jake.

I follow the instructions of the article about filters but doesn't work,
anyway I read a lot of posted subjects in this forum about the same problem
(with variants), and I conclude that I was using the worng strategy. Link two
Dropdown Lists are not necesary the best solution in my case.

I just want to select a user name and know their email address. In my WSS
site I have a List whre you have associted in each row the User Name and
Email for that user. So I think to put in a single repeting section two
controls:

1) DropDown List (DDL) associated to a secondary data source that reads the
user name from WSS, in this connection I also have the email field but this
cannot be used by display or value attribute in the DDL if I already use the
username in that control.

2) A simple text box.

Making a mind merge of all the posted comments in this forum about the
problem I follow the next steps:

In the DDL properties create a new rule.
For this new rule I add a new action.
The action was Set a field's value.
In the Field box I add the prevoius created text box. I use for this the
main data source.
In the value fiel I select Insert a Field or Group and swith the Data Source
to the secondary data source that actually is populting the DDL, but instead
to select the user name field I use the email (remeber bout are in the same
WSS List).
Later select the Filter Data Button and add a new filter.
The filter was associated to a expression @email[. = current()].
I click OK in all open dialogs.

Unfortunally that fails.

Have an idea about how to improve this exercise?

I will appreciate any help



Jake said:
Hi Daniel,

This is easily done with the use of filters. You can find instructions here:
http://blogs.msdn.com/infopath/archive/2004/03/24/95529.aspx
So, when you select the name from the drop-down list linked to the
Sharepoint list, it will automatically populate the correct email address
from the same list. Thanks,
-Jake
 
D

Daniel

Well I catch the point, but I have the doubt about how can I ask the *where*
to compare both list.

Could you give me an example about how do that?

Best regards.

Daniel

Jake said:
Daniel,

This scheme will not work with a text box control since you can't have it
lookup values from your WSS list. You need the 2nd control to be a DDL also.
I suspect the problem you were having with making this work is that you
didn't change the Data Source of the 2nd control.

Here is an example:

I have a WSS list which has columns for Sales rep name, telephone #, sales
id#, email address.

I have a DDL control with a data connection to my WSS list, looking up data
from the "Sales Rep Name" column.

I have DDL controls for telephone #, sales id#, & email address. I set each
of these controls to look up values to that same data connection. Under
Entries, I select the appropriate column where the matching data is found in
the WSS list (telephone #, etc..) I do *not* put any filters on these
controls.

Going back to the DDL control for the "Sales Rep Name", I now create a rule
to set the value for all the other fields. It is here where you must setup
the filter to have the correct value populate. To autopopulate the correct
"email address", I not only have to select the correct column here from WSS
data connection, but I must click the 'filter data' button and add a filter
that says display the data for "Email address in the WSS list *where* "Sales
Rep Name" from my main data source is equal to the value of "Sales Rep Name"
from my secondary data source (the WSS list). This drives the correct data to
be displayed.

Now, when a user selects "Sales Rep Name" from the DDL, the rest of their
information is automatically populated on the other DDL's.

Hope this helps clarify. Thanks,
-Jake





Daniel said:
Thanks Jake.

I follow the instructions of the article about filters but doesn't work,
anyway I read a lot of posted subjects in this forum about the same problem
(with variants), and I conclude that I was using the worng strategy. Link two
Dropdown Lists are not necesary the best solution in my case.

I just want to select a user name and know their email address. In my WSS
site I have a List whre you have associted in each row the User Name and
Email for that user. So I think to put in a single repeting section two
controls:

1) DropDown List (DDL) associated to a secondary data source that reads the
user name from WSS, in this connection I also have the email field but this
cannot be used by display or value attribute in the DDL if I already use the
username in that control.

2) A simple text box.

Making a mind merge of all the posted comments in this forum about the
problem I follow the next steps:

In the DDL properties create a new rule.
For this new rule I add a new action.
The action was Set a field's value.
In the Field box I add the prevoius created text box. I use for this the
main data source.
In the value fiel I select Insert a Field or Group and swith the Data Source
to the secondary data source that actually is populting the DDL, but instead
to select the user name field I use the email (remeber bout are in the same
WSS List).
Later select the Filter Data Button and add a new filter.
The filter was associated to a expression @email[. = current()].
I click OK in all open dialogs.

Unfortunally that fails.

Have an idea about how to improve this exercise?

I will appreciate any help



Jake said:
Hi Daniel,

This is easily done with the use of filters. You can find instructions here:
http://blogs.msdn.com/infopath/archive/2004/03/24/95529.aspx
So, when you select the name from the drop-down list linked to the
Sharepoint list, it will automatically populate the correct email address
from the same list. Thanks,
-Jake

:

Hello.-

I'm trying to use DropDown list box from a Sharepoint list that have two
columns:
User Name & Email

The Idea is when a filler-user select an user name from the list I get as
value the email, because later I will send an email for all the selected
users (the drop down is in a repeting section).

My problem is associated to the fact that the DropDown list only allow to
use a single SharePoint column and this is also the only that can be used as
both: Display and Value for that list. I'm evaluating to use two DropDown
lists and syncronize it.

Have somebody an idea about how to syncronize two DropDown List?
Have somebody an idea about an alternative to resolve this issue?

Thanks

Daniel
 
J

Jake

You do that when you filter the "Set a field's value" action.

=Fx Set a field's value:
Sales_Rep_Email=@Sales_Rep_Email[@Sales_Rep_Name_=Sales_Rep_Name]

Where Sales_Rep_Name is the field in the infopath form (ie. Primary data
source) and Sales_Rep_Name is the column in the WSS list (ie. Secondary data
source).

-Jake

Daniel said:
Well I catch the point, but I have the doubt about how can I ask the *where*
to compare both list.

Could you give me an example about how do that?

Best regards.

Daniel

Jake said:
Daniel,

This scheme will not work with a text box control since you can't have it
lookup values from your WSS list. You need the 2nd control to be a DDL also.
I suspect the problem you were having with making this work is that you
didn't change the Data Source of the 2nd control.

Here is an example:

I have a WSS list which has columns for Sales rep name, telephone #, sales
id#, email address.

I have a DDL control with a data connection to my WSS list, looking up data
from the "Sales Rep Name" column.

I have DDL controls for telephone #, sales id#, & email address. I set each
of these controls to look up values to that same data connection. Under
Entries, I select the appropriate column where the matching data is found in
the WSS list (telephone #, etc..) I do *not* put any filters on these
controls.

Going back to the DDL control for the "Sales Rep Name", I now create a rule
to set the value for all the other fields. It is here where you must setup
the filter to have the correct value populate. To autopopulate the correct
"email address", I not only have to select the correct column here from WSS
data connection, but I must click the 'filter data' button and add a filter
that says display the data for "Email address in the WSS list *where* "Sales
Rep Name" from my main data source is equal to the value of "Sales Rep Name"
from my secondary data source (the WSS list). This drives the correct data to
be displayed.

Now, when a user selects "Sales Rep Name" from the DDL, the rest of their
information is automatically populated on the other DDL's.

Hope this helps clarify. Thanks,
-Jake





Daniel said:
Thanks Jake.

I follow the instructions of the article about filters but doesn't work,
anyway I read a lot of posted subjects in this forum about the same problem
(with variants), and I conclude that I was using the worng strategy. Link two
Dropdown Lists are not necesary the best solution in my case.

I just want to select a user name and know their email address. In my WSS
site I have a List whre you have associted in each row the User Name and
Email for that user. So I think to put in a single repeting section two
controls:

1) DropDown List (DDL) associated to a secondary data source that reads the
user name from WSS, in this connection I also have the email field but this
cannot be used by display or value attribute in the DDL if I already use the
username in that control.

2) A simple text box.

Making a mind merge of all the posted comments in this forum about the
problem I follow the next steps:

In the DDL properties create a new rule.
For this new rule I add a new action.
The action was Set a field's value.
In the Field box I add the prevoius created text box. I use for this the
main data source.
In the value fiel I select Insert a Field or Group and swith the Data Source
to the secondary data source that actually is populting the DDL, but instead
to select the user name field I use the email (remeber bout are in the same
WSS List).
Later select the Filter Data Button and add a new filter.
The filter was associated to a expression @email[. = current()].
I click OK in all open dialogs.

Unfortunally that fails.

Have an idea about how to improve this exercise?

I will appreciate any help



:

Hi Daniel,

This is easily done with the use of filters. You can find instructions here:
http://blogs.msdn.com/infopath/archive/2004/03/24/95529.aspx
So, when you select the name from the drop-down list linked to the
Sharepoint list, it will automatically populate the correct email address
from the same list. Thanks,
-Jake

:

Hello.-

I'm trying to use DropDown list box from a Sharepoint list that have two
columns:
User Name & Email

The Idea is when a filler-user select an user name from the list I get as
value the email, because later I will send an email for all the selected
users (the drop down is in a repeting section).

My problem is associated to the fact that the DropDown list only allow to
use a single SharePoint column and this is also the only that can be used as
both: Display and Value for that list. I'm evaluating to use two DropDown
lists and syncronize it.

Have somebody an idea about how to syncronize two DropDown List?
Have somebody an idea about an alternative to resolve this issue?

Thanks

Daniel
 
J

John

Jake,
I have a similar situation to Daniel where I want to use a selection from a
drop down list to populate another drop down list with a value. My two drop
down lists are:
LastName
Title

Both LastName and Title have a sharepoint list as a data source (the column
names in the sharepoint list are the same as the InfoPath field names). I’ve
tested the ddl’s and they both connect to the data source (show their drop
down list selections).

Following your earlier post to Daniel, I set the rule for the LastName ddl
in InfoPath to the following in order to populate the Title ddl with the
corresponding Title column in the sharepoint list:

Title = @Title[@LastName = .] (the “.†at the end of the formula was
inserted by Infopath and I assume represents the primary field LastName)

After entering the filter, I checked the formula and InfoPath said it had no
errors. When I previewed the form and selected a name from the LastName ddl,
a “false†title appeared in the Title ddl (if I clicked down on the Title
ddl, the other “Titles†in the sharepoint list appeared. The “false†title
was listed at the top.

Any idea what I’m doing wrong? Thanks.


Jake said:
You do that when you filter the "Set a field's value" action.

=Fx Set a field's value:
Sales_Rep_Email=@Sales_Rep_Email[@Sales_Rep_Name_=Sales_Rep_Name]

Where Sales_Rep_Name is the field in the infopath form (ie. Primary data
source) and Sales_Rep_Name is the column in the WSS list (ie. Secondary data
source).

-Jake

Daniel said:
Well I catch the point, but I have the doubt about how can I ask the *where*
to compare both list.

Could you give me an example about how do that?

Best regards.

Daniel

Jake said:
Daniel,

This scheme will not work with a text box control since you can't have it
lookup values from your WSS list. You need the 2nd control to be a DDL also.
I suspect the problem you were having with making this work is that you
didn't change the Data Source of the 2nd control.

Here is an example:

I have a WSS list which has columns for Sales rep name, telephone #, sales
id#, email address.

I have a DDL control with a data connection to my WSS list, looking up data
from the "Sales Rep Name" column.

I have DDL controls for telephone #, sales id#, & email address. I set each
of these controls to look up values to that same data connection. Under
Entries, I select the appropriate column where the matching data is found in
the WSS list (telephone #, etc..) I do *not* put any filters on these
controls.

Going back to the DDL control for the "Sales Rep Name", I now create a rule
to set the value for all the other fields. It is here where you must setup
the filter to have the correct value populate. To autopopulate the correct
"email address", I not only have to select the correct column here from WSS
data connection, but I must click the 'filter data' button and add a filter
that says display the data for "Email address in the WSS list *where* "Sales
Rep Name" from my main data source is equal to the value of "Sales Rep Name"
from my secondary data source (the WSS list). This drives the correct data to
be displayed.

Now, when a user selects "Sales Rep Name" from the DDL, the rest of their
information is automatically populated on the other DDL's.

Hope this helps clarify. Thanks,
-Jake





:

Thanks Jake.

I follow the instructions of the article about filters but doesn't work,
anyway I read a lot of posted subjects in this forum about the same problem
(with variants), and I conclude that I was using the worng strategy. Link two
Dropdown Lists are not necesary the best solution in my case.

I just want to select a user name and know their email address. In my WSS
site I have a List whre you have associted in each row the User Name and
Email for that user. So I think to put in a single repeting section two
controls:

1) DropDown List (DDL) associated to a secondary data source that reads the
user name from WSS, in this connection I also have the email field but this
cannot be used by display or value attribute in the DDL if I already use the
username in that control.

2) A simple text box.

Making a mind merge of all the posted comments in this forum about the
problem I follow the next steps:

In the DDL properties create a new rule.
For this new rule I add a new action.
The action was Set a field's value.
In the Field box I add the prevoius created text box. I use for this the
main data source.
In the value fiel I select Insert a Field or Group and swith the Data Source
to the secondary data source that actually is populting the DDL, but instead
to select the user name field I use the email (remeber bout are in the same
WSS List).
Later select the Filter Data Button and add a new filter.
The filter was associated to a expression @email[. = current()].
I click OK in all open dialogs.

Unfortunally that fails.

Have an idea about how to improve this exercise?

I will appreciate any help



:

Hi Daniel,

This is easily done with the use of filters. You can find instructions here:
http://blogs.msdn.com/infopath/archive/2004/03/24/95529.aspx
So, when you select the name from the drop-down list linked to the
Sharepoint list, it will automatically populate the correct email address
from the same list. Thanks,
-Jake

:

Hello.-

I'm trying to use DropDown list box from a Sharepoint list that have two
columns:
User Name & Email

The Idea is when a filler-user select an user name from the list I get as
value the email, because later I will send an email for all the selected
users (the drop down is in a repeting section).

My problem is associated to the fact that the DropDown list only allow to
use a single SharePoint column and this is also the only that can be used as
both: Display and Value for that list. I'm evaluating to use two DropDown
lists and syncronize it.

Have somebody an idea about how to syncronize two DropDown List?
Have somebody an idea about an alternative to resolve this issue?

Thanks

Daniel
 

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