Skip to main content
Nintex Community Menu Bar

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

  • January 9, 2018
  • 8 replies
  • 52 views

Forum|alt.badge.img+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

Forum|alt.badge.img+12
  • January 9, 2018

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


Forum|alt.badge.img+14
  • Scholar
  • January 10, 2018

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


Forum|alt.badge.img+12
  • January 10, 2018

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


Forum|alt.badge.img+1
  • Author
  • January 10, 2018

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!


Forum|alt.badge.img+14
  • Scholar
  • January 10, 2018

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


Forum|alt.badge.img+12
  • January 12, 2018

Not mine, but the dreams of others grin.png

(jk)


Forum|alt.badge.img+1
  • February 28, 2019

Hi emha, 

 

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


Forum|alt.badge.img
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))