cancel
Showing results for 
Search instead for 
Did you mean: 
mbayoumi
Nintex Newbie

Trying to filter a list lookup based on two drop down selections

Jump to solution

I'm working on an activity tracker, users will select the Team (choice of three; AA, BB, CC) and the Type (choice of two; AdHoc or Regular) and i need to use those two values to filter a lookup list of tasks.

For example, this is the list i am trying to get data from, based on team and type fields the user selects i would like to return the third column.

   

TeamTypeTask
AARegularTPI Report
AARegularBU Request
AARegularOther
BBRegularTrade Log
BBRegularApplicability of New Rules
BBRegularOther
BBRegularIntranet Upload
CCRegularScope of Permission
CCRegularReport submissions
CCRegularRegister Metrics Report
CCRegularOther
AAAdHocResearch
AAAdHocOther Reports
AAAdHocQuery resolving
AAAdHocOther
BBAdHocMeeting set up
BBAdHocFormatting (In word or PPT)
BBAdHocProviding access
BBAdHocOther
CCAdHocConsultation
CCAdHocOther

  • The Lookup control doesn't give an option to use multiple criteria to filter.
  • I tried creating a helper column concatenating the two fields in the list and a calculated value in the form doing the same - the Lookup control filter doesn't work with the calculated value
  • Cascading lookups as described here won't work because any of the Teams can have either of the Types and as far as i can see that solution reqiures the second field to be exclusive to the first field.
  • List Lookup filter doesn't give the option of filtering by a variable

I've hit a total block and all i can find is are other people asking similar questions (1, 2) without answers.

Any help or advice would be highly appreciated.

Labels: (3)
Reply
4 Replies
pfudala
Nintex Newbie

Re: Trying to filter a list lookup based on two drop down selections

Jump to solution

Hi Mishaal,

There's a way to do this using some tips and JavaScript.

I assume your helper column in the list is called HelperColumn.

Set your 2 lookup fields "Team" and "Type" in the form.

Add an hidden field called "HiddenField". (Add on rule to hide it anytime).

These 3 controls are set to store Client ID in JavaScript variable with their respective name, as below :

Add a lookup control to your "tasks" list and set the "Filtering" section as below :

Finally add (and adapt) this script to the "Custom Javascript" section of the form settings :

NWF.FormFiller.Events.RegisterAfterReady(function()

{

    NWF$("#"+TeamControl).change(ProcessConcatenation);

    NWF$("#"+TypeControl).change(ProcessConcatenation);

    function ProcessConcatenation()

    {

        var teamValue = NWF$("#"+TeamControl).find("option:selected").text();

        var typeValue = NWF$("#"+TypeControl).find("option:selected").text();

        NWF$("#"+HiddenField).val(teamValue+typeValue);       

        NWF$("#"+HiddenField).trigger("change");

    }

});

If it worked as expected, you should have this :

0 Kudos
Reply
mbayoumi
Nintex Newbie

Re: Trying to filter a list lookup based on two drop down selections

Jump to solution

Thanks Pierre,

I got it working using your solution but i had really been hoping to avoid using javascript. It makes the documentation and maintenance that much harder. It's a bit ridiculous to me that you can't perform a lookup filter by multiple criteria or from a calculated value.

0 Kudos
Reply
Highlighted
wilkies0106aw
Nintex Newbie

Re: Trying to filter a list lookup based on two drop down selections

Jump to solution

Hi,

Does this still work ? I can't get this to work at all at the moment.

0 Kudos
Reply
mbayoumi
Nintex Newbie

Re: Trying to filter a list lookup based on two drop down selections

Jump to solution

HI Andrew,

This probably won't work now that the Javascript handling of nintex got all messed up by version 2.10.0, but now it does let you filter a lookup by a calculated value. So that's one thing.

Reply