Cascading Dropdowns not working.


Badge +3

Hello everybody,

recently I got the requirement to add filtering to certain dropdowns based on another dropdowns value.

Since both of the dropdowns are list lookups and the second dropdown's source list has a lookup to the source list of the other one, I thought cascading dropdowns would be the best solution.

I quickly whipped up 3 test lists. ZID-Abteilungen (with information on our orgs divisions), ZID-Teams (with information about our orgs teams and a lookup to the ZID-Abteilungen list to identify the division they're part of) and Cascading Dropdown Test (a list to test the cascading dropdown functionality, as the name implies. It features a lookup to ZID-Abteilungen and ZID-Teams).

ZID-Abteilungen:

ZID-Teams

In the nintex form for the Cascading Dropdown Test I put two list-lookups (from the "list columns" section):

I left the lookup control for "ZID-Abteilungen" as it was and configured the control for "ZID-Teams" as follows:

I published the form and tested it. When I chose a division, the team-lookup was "disabled" (no options to chose from).

I was quite confused. I started looking around for solutions on the nintex community and found a couple of posts, none of which seemed to solve the problem. I then implemented a tip from Marian Hatala‌ to put a calculated value on the form to check whether everything works out. I configured the calculated value as follows: parseLookup(AbteilungLookup,true).

I then tried filtering the control (for the team lookup) by that value, but it still wouldn't work.

Last I tried to set the filtering criteria to "by specific value" and put one "IT-Solutions", I previewed the form and voilà, it worked. So it seems that the filtering should work, but not "by a control's value".

Does anyone maybe have a clue what might be happening here?

Kind regards,

Lucas


30 replies

Userlevel 5
Badge +14

can you post configuration of 'AbteilungLookup' form control, and both 'Team' and 'Abteilung' list fields from the list you build the form for?

Badge +3

The config for Abteilung Lookup (or AbteilungLookup, since Nintex removed the whitespace) looks as follows:

(sorry for the rather large screenshot)

The config for the Abteilung list field:

And for the Team list field:

I hope these screenshots suffice for finding a probable cause.

Thanks for replying happy.png

PS: I hope SP being German isn't too much of a hindrance.

Userlevel 2
Badge +11

Be aware that (,and hopefully I'm not stating the obvious/something you already know,) the value of Abteilungen in your ZID-Teams list is not the value shown (e.g. IT-Management) in the list view. It actually contains the ID as well in the following format:

<ID>;#<Display Value> for example: 1;#IT-Management

Multiple selection lookupvalues go a bit further in the the 2nd+ ID also gets the ;# prefix. for example:

1;#IT-Management;#2;#IT-Operations

Hopefully this helps, in addition to Marian's and other replies to come.

NB: Cascading dropdowns are often created by using simple lookup lists, which unfortunately contain duplicate information (where's the implementation of the InfoPath @Unique function?????).

Badge +3

Thanks for your comment happy.png

I was aware of that fact, as I got to see it when using the calculated value withouth using "parseLookup()".

As I use "by a control's value" I expected nintex to sort that out automatically.

Even if I filter "by a specific value" it works (tried it with the unparsed calculated value if I recall correctly).

I will look into this and edit this comment accordingly.

Edit:

I implemented two more calculated value fields: Now I have both the unparsed and parsed values displayed in the form (so I don't have to constantly switch around):

I tried filtering "by a control's value" against both, the unparsed and parsed values, none of which worked.

Still, filtering "by a specific value" (e.g. IT-Solutions) works flawlessly.

Userlevel 2
Badge +11

Hi Lucas,

I created a list with the departments, a Teams list with Title and listlookup for Abteiling. And finally a form list with Title and list lookup column Abteilung. For this last one I created a simple form and added next to Title and the Abteilung dropdown another list lookup field (not linked to a column) for selecting a Team using the selected Abteilung as a filter. And it seems to be working for me.

This is my setup for the filtered list lookup into Teams:

List column name is the Title column of the ZID-Teams list to show in the dropdown. No need to parse the selected Abteilung. I'm using Nintex Forms 2013 on-premise v2.11.2.2

Next I added a list lookup column Team to the form list and reset its Nintex Form. Applying the same filtering setting (minus indicating the Title column for use as display value in the dropdown) also works as expected. So maybe you could check you Nintex Forms version in order to determine whether or not it needs updating.

Badge +3

Hi Jean-Pierre Huls

Thanks for your input happy.png

I tried your variant, but without success. Using an unconnected list lookup control for Teams yields the same result, no options to chose from (aka a "disabled"-like control).

Our Nintex Forms (2013 on-premise) Version is v2.11.2.0.

Userlevel 2
Badge +11

You might consider checking the release notes for 2.11.2.1 & 2.11.2.2.

Badge +3

Hi Jean-Pierre Huls,

I checked the release notes for v2.11.2.2, v2.11.2.20 and v2.11.3.0 but didn't find anything that seems to be directly connected to this specific issue.

Apparently another division within our org (on the same environment) also experiences this issue. Thus I doubt it has anything to do with the actual configuration of my form and more likely something to do with our environment.

I will update the post itself should I encounter any advancements concerning (the solution of) this issue happy.png

Userlevel 2
Badge +11

That would be appreciated Lucas Münch. In case your company has a test/dev environment, and you not already tried this, you could test there as well, and maybe also after updating Nintex Forms to the latest version.... looking forward to any updates.

Badge +3

I have already tested it on both of our environments. The issue can be found on both.

As to updating Nintex, that could take a while as I am not the one making that decision.

Userlevel 5
Badge +14

your configuration seems to be correct.

it seems you hit a bug introduced in your specific release  - cascaded lookups doesn't work on sites running in different then English locale.

if you have a chance, test it on english site, it should work.

Badge +3

Hi Marian Hatala,

Very  inter‌esting. If this is truely the cause, it would be quite the revelation. We (us and another division encountering the same problem) have been looking all over the place while trying to find the cause of this problem.

Since we are in a German-speaking environment, all of our SharePoint is obviously setup in German.

Do you know whether setting up a sub page set to English (language and locale) is enough to test it? Or would we need an entirely new environment?

Userlevel 5
Badge +14

from my experience site with english locale should be enough.

Badge +3

Ok, thanks.

I'll try it out right away.

I will update the comment accordingly.

UPDATE:

I have created a sub site (lang set to English):

215383_pastedImage_1.png

I have also set the locale to English (UK):

215384_pastedImage_2.png

I then created 3 lists:

215385_pastedImage_3.png215386_pastedImage_4.png215387_pastedImage_5.png

For the last one, the Country and City fields are lookups into the respective lists.

I then created a form:

215388_pastedImage_6.png

The settings for the city lookup are:

215389_pastedImage_7.png

So it all seems to be set up properly (except if I missed something plain.png)

I quickly published the form and tested it:

215390_pastedImage_8.png

After choosing a country, the city dropdown still is in this disabled-ish state.

Either I did something wrong, which totally might be the case as I was in a bit of a rush, or this is (sadly) not the cause of my issue.

If a come across any further advances concerning solving this issue I will update the post accordingly.

Again, thanks for your effort in helping me It's greatly appreciated.

Userlevel 5
Badge +14

you're on a right track happy.png

it's one of symptoms of the bug (or two bugs which mutually depends on each other)

define a default value for Country lookup, so that when form is instantiated City lookup have valid value to filter by.

after that cascade should work while you'll select valid (non empty) value in Country lookup.

once you select empty value in Country lookup, or a value that doesn't have any City assigned, City lookup gets disabled again. and it will not recover from the state anymore

Badge +4

In a similar situation, I've added a calculated column to the source list (to each source list actually) that is a calculation of the Title, so the source will have Title and calcTitle.  CalcTitle is just set to = [Title] - so you'll appear to be repeating this.  However, at the next step, the caclTitle will be text that is available for your cascaded lookup. 

I hope this may help resolve your issue in a simple manner. 

Also, please have a look at Cascading drop downs and Nintex Forms for SharePoint‌ - this may help

Badge +3

Hi Marian Hatala,

Thanks for the input, very interesting!

I managed to set a default value for the country value using the following JS snippet (mentioned in multiple Nintex Community posts):

NWF$(document).ready(function() 
  {NWF$("#" + countryLookup).val('7');}
);‍‍‍‍‍

countryLookup being the Client ID JavaScript variable name.

Value is 7 since it is the first item in the dropdown (not the list though) since that is alphabetically ordered.

Upon testing the form, the Country lookup gets populated with "Austria" and the City lookup is "active".

When trying to pick a value, you'll notice that the dropdown still is empty:

So I'd say the workaround was semi-successful, the dropdown is no longer disabled, but it still won't show the values to chose from.

Badge +3

Hi Carolyn Blackledge,

I have obviously looked at Cascading drop downs and Nintex Forms for SharePoint, although it didn't really help all that much since it just tells you how to do a cascading dropdown, which I already knew.

Concerning your suggstion about using a calculated field, I fail to see how that would help me out in this situation.

From reading your response I feel like you accidentally left out a part, specifically before (or after, depending on how you'd write it) "However, at the next step..."

If I understand your instructions correctly, you suggest that I have a column of the type calculated field, which just repeats what would be (in my latest example, see the exchange between Marian Hatalaand me) City and Country respectively?

These two are already plain old text, and the Country Lookup (in the City list) can't be used in a calculated field (as it is a lookup) at least from my experience.

Please correct my assumptions should they be misguided. Any and all input is welcome ^^

Userlevel 5
Badge +14

setting default value with javascript is too late.

control is already instantiated, and since originally filtered by empty value it's already disabled and in some incorrect state.

sorry, I haven't first realized lookup control doesn't provide a way to configure default value in control settings.

I reviewed my own scenario and there I filtered lookup by a simple text control. in that setup all what I've written above is very valid.

I affraid you will not manage to get it working with two lookups.

btw, apart from that your script  to set lookup control's value is not correct...

Badge +3
setting default value with javascript is too late.

control is already instantiated, and since originally filtered by empty value it's already disabled and in some incorrect state.

Huh, I thought that might be the case, thanks for confirming.

I reviewed my own scenario and there I filtered lookup by a simple text control. in that setup all what I've written above is very valid.  

Can you elaborate?

I affraid you will not manage to get it working with two lookups.

What a shame.

btw, apart from that your script  to set lookup control's value is not correct...

Weird, it worked when I tried it out...  Could you point out the mistake? I'm not that well versed when it comes to JS ^^

it's one of symptoms of the bug (or two bugs which mutually depends on each other)

Is there a place where all (or most of) the known bugs are documented? I tried searching for it but haven't found anything so far.

Thanks again for all the help so far happy.png

Edit:

While testing random things I noticed that even if I set "action when no filter applied" to "show all values" while using "By a control's value" will not result in a working dropdown. All of this while trying to use a choice control for the country selection (instead of a lookup) and using a city list which doesn't have a lookup for country but just a simple text. The City control in the form however is a lookup into the city list.

Userlevel 5
Badge +14
Can you elaborate?

imagine you have a textbox instead of Country dropdown. type in country manually and let Cities filter by that country

Could you point out the mistake? 

the exact script differs with (almost every) forms version.

for newest releases have a look on Jean-Pierre Huls‌' post here  https://community.nintex.com/message/60237-re-javascript-to-set-value-in-lookup-list-control?commentID=60237#comment-601… 

Is there a place where all (or most of) the known bugs are documented? 

no. nintex keeps them secret for unknown reasons...

Badge +3

Ah I see, had I read the sentence again, it probably woudl've made sense the first time 'round. But me being me, it didn't, probably directly tied to me being fed up with this whole matter after trying to figure out some way for what felt like eternity.

Thanks for sharing Jean-Pierre's post, I'll be sure to check it out.

no. nintex keeps them secret for unknown reasons...

They must be plotting their next attempt to take over the world then... Just kidding. Guess it's just the way they handle things.

Edit:

Using a simple text field for country, a lookup for city (onto city list) and filtering by the textfield, for "where field" I tried both a country (lookup) and a country (basic text) inside the source list. Neither of those yielded a functioning result. Am I missing some glaringly obvious mistake of mine?

Userlevel 5
Badge +14
Using a simple text field for country, a lookup for city (onto city list) and filtering by the textfield

with no default value for textbox (control settings, no javascript!), City lookup is instantiated incorrectly and renders like disabled.

if you provide a default value for textbox that makes City lookup populate with at least one value, City wil instantiate correctly and will filter correctly by textbox value.

(until, as mentioned above, you do not let it filter by empty textbox, or by a textbox value with no related cities)

Badge +3

Ok, I'm am fairly certain there is something else "broken" about our SharePoint / Nintex / Whatever it may be.

Because using the setup for the form you just described still doesn't work. Even when using a default value of "England" which should then leave me with the options "London", "Manchester" and "Liverpool", it does this:

215515_pastedImage_3.png

I provided the default via the list settings and then also tried it with providing a default value inside the control settings which yielded the same results.

Again, when using the same setup and just changing to filter by specific value and putting "England" as the value, it works:

215516_pastedImage_4.png

So it seems no matter what I do, the filtering "by a control's value" is the culprit.

Userlevel 5
Badge +14

have you checked developer console, whether there are not reported any errors?

Reply