How do I hide a empty list lookup control when not needed?

  • 9 January 2018
  • 8 replies
  • 14 views

Badge +1

Hello,

Here is my Problem I have a Cascading lookup in my Nintex Form that works.  The problem is that for some of the selections when filtered there are no results.  I want to hide those lookup controls when empty but because of the default return value of a lookup (null) I can't get the rule to work.  If I use the Rule isnullorempty(Affiliation) or not(Affiliation) it will hide but will not unhide when required to enter more Choices. What am I doing wrong?


8 replies

Userlevel 5
Badge +12

Hi Daniel,

What you'll have to do is write a rule that targets the prior selected value of the prior lookup ---- so if you select a value in List Lookup A that dictates List lookup B should be shown, then you're rule should account for this.   Depending on the number of permutations/values, your rule may become complex or long so you will have to figure out how to optimize it best for your situation.

Thanks

Mike

Userlevel 5
Badge +14

have a look on this similar case here -   

you will need to use formula like shown in there in formatting rule to hide empty control

Userlevel 5
Badge +12

Funny,  I was also going to suggest using a calculation control in combination with my suggestion, but I like to sometimes leave things to the imagination.  happy.png

Badge +1

The final solution was to use the calculated value from the filtering lists and columns and use that to create a total number of values when filtered.  That way if their was any results the final formula in the calculated control was        length(lookup('Affiliation','Title',Affiliation,'Parent1'true)) I had to use it for all the cascading fields.  Then it was a simple hide if Filtervalue(calculatedcontrol)==0 rule to hide. Cascading lookup validation control  goes in to more detail if anyone has questions.

Thanks for the help!

Userlevel 5
Badge +14

I'm sorry I have broken your imaginations happy.png

Userlevel 5
Badge +12

Not mine, but the dreams of others grin.png

(jk)

Badge +1

Hi emha, 

 

Would you repost the URL to the article to which you were referring? Thanks!

Badge
One comma is missing in this post but it worked for me :)
In addition, "length" function return 1 if lookup empty but "count" function return 0 if lookup empty. So I use with count function in my case. Thank you,

count(lookup('Affiliation','Title',Affiliation,'Parent1',true))

Reply