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
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.
>
[quoted text clipped - 69 lines]
> > >
> > > Daniel
Daniel - 22 Feb 2006 05:26 GMT
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
> Daniel,
>
[quoted text clipped - 106 lines]
> > > >
> > > > Daniel
Jake - 22 Feb 2006 16:05 GMT
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
> Well I catch the point, but I have the doubt about how can I ask the *where*
> to compare both list.
[quoted text clipped - 115 lines]
> > > > >
> > > > > Daniel
John - 28 Feb 2006 17:15 GMT
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.
> You do that when you filter the "Set a field's value" action.
>
[quoted text clipped - 126 lines]
> > > > > >
> > > > > > Daniel