Forms2010 - How to Filter a list lookup based on value of another list lookup

  • 2 October 2014
  • 4 replies
  • 0 views

Badge +1

I have a Nintex 2010 form that includes 2 list lookup controls - I would like to filter the second control based on the value selected in the first control.  I have definitely tried to use the filtering options.  If I set a static value for the second lookup's filter the filter works - when I try to set the filter to the first lookup's value - the form does a refresh but does not filter the second lookup - any help is appriciated!  


4 replies

Userlevel 5
Badge +12

Hello,

The problem is that it is looking to filter by an "ID" rather than the value that you would normally expect.

So for example, if you have two source lists:

1) State

2) City

State would contain as in its Title column the name of all the states.

City list would contain the City name in its Title column, and then have another Column of type "Lookup" give it a name State, from which you would select a value from the State list.

Name both controls on the form:  lstState, lstCity

On the lstCity control configure as follows under filtering:

By a control's value

Where field: ID

Filtered by control:   lstState

Thanks

Badge +1

Ok so - more detail: 
My source list for the List Lookup control does not have a lookup column.  In fact, I was trying to use the same list (but different views) as the source list.  So with the State, City example: one list with column for state and column for city - state view shows all states with an empty city - second view (for cities) shows state and city (when city not empty).  It is this second view (and control) that I was trying to filter based on the state selected in the first control.  Hard to describe - hope this makes sense.  

Both replies helpful - thank you! Maybe I cannot reuse the same list as I am attempting.

Userlevel 5
Badge +12

Using the same list, you can still filter, but there are some differences you'd have to take into consideration.  If you were to filter on ID - then it would always only return 1 result -> the row to which the ID belonged.   The other issue you might run into is, for example using state, having duplicate states in the first list.

For example, with the following data in the list, you'd get 3 instances of OH in the first state dropdown list.

OH - Cleveland

OH - Cincinnati

OH - Middleburg Heights

If duplicates aren't an issue for you, meaning there will be a one to one relationship between key and value, then you can still use filtering on ID.

If not, I'd suggest abstracting the duplicates into its own list  and then making it a list lookup column in the other.

Hope that helps a bit,
Mike

Badge +4

hi there,

I believe I am trying to do a similar thing and I've looked through quite a few posts relating to list lookups and cascading look ups but must be doing something wrong because it's not working. 

 

scenario:

I have a List in Sharepoint and we use Nintex Forms/Workflows. This Main List is where I want all the data to collate at the end of the process.

I have various Source Lists including:

"Product Groups" this list contains columns

  • "Product Grouping" type single line of text
  • "Product Name" type single line of text

 

"Product Names" this list contains columns

  • "Specific Product Name" type single line of text
  • "ProductNamesLookup" type Lookup 

 

I have a New Item form where the initiator can choose the Product Group based on a list lookup using "Product Groupings" as the Source List. This works fine. 

 

I have an approval form where I am trying to get the approver to choose the "Specific Product Name" based on the Product Grouping as a filter. 

 

When I run it, the Specific Product Name on the Approval form does not offer any drop downs. 

 

In my Main List, I also have created single line of text columns to receive/record the choice made by the user on the form and updated the Text Connected To field on both forms.

 

My settings are shown in the screenshots below.

 

This is the List Lookup on the Start Form (when I click on New Item):

371iB47D32BE01198EFF.png

This is the control settings on the List Lookup on the Approval Form which is to be filtered based on the selection made in the above control on the start form:

372i1152B36BF1055FFB.png

This is the Display Only field Control Settings on the approval form showing the choice made by the initiator:

373iB4A0B5D9215480BF.png

and my current result trying to select the filtered value on the approval form looks like this:

374i5C38396D73C5ED48.png

Reply