Skip to main content

You know when you get asked a question and you respond really quick because, you know.... it makes sense in that microsecond that you spent thinking about it?  Then of course when that person tries to follow you advice, everything goes pear shaped.  Well, that happened to me the other day.

 

The question was around having tabs in your Nintex Form.  Here is a post on tabs in Nintex Forms for Office 365 and here's one for Nintex Forms for SharePoint. The tab pages visibility is controlled by rules on the form.  The request was for having another tab called "All Tabs", which when selected, would show all the tab pages.

 

My first response, was just put in another rule which checks all the tabs...blah blah blah... wow was I way off.  That's why I should have taken my vitamins in the morning happy.png

 

So now to the real solution.  YOU DON'T NEED ANOTHER RULE!!!

 

What you do need, is to tweak the existing rules for each tab.

FormDesign.png

This is the form that we can look at as an example.  Notice there are 3 tabs (Tab1, Tab2 and All Tabs).

TabControl.pngThis is how you configure it, in case you haven't seen this before.  This is a simple Choice control with 3 choices, set to Option buttons and Render as Buttons (Yes).

 

So in a normal Tab control scenario, you would have a rule for each tab that says something like this : Tabs != 'Tab1'  --> then hide the panel for Tab1.  You would have another rule to cater for Tab2.  This is because the Nintex Forms rules work on the principle that if the condition is met, hide the attached controls.  (not if the rule is met, show them).  Which is why you can't have a rule for 'All Tabs'.  The other rules would override the All Tabs rule.

 

To get the All Tabs to work, we need to modify each of the other rules.

For Tab1 :

HideRule.png

Notice that the rule now has a second condition which is Tabs != 'All Tabs'.

So now we are saying, only hide this panel (Tab page 1), if the tab control is anything but Tab1 and All Tabs.  If I select either of those tabs, I want to see the associated panel of controls.  Makes sense right?

 

So here it is in action.  If you select Tab1, it looks like this:

Tab1Selected.png

If you select Tab2 it will look like this:

Tab2Selected.png

If you select All Tabs, it will looks like this :

AllTabsSelected.png

This is where you take a closer look at the screenshot above and notice something odd.  Why is the panel for Tab2 above the panel for Tab1????  That was very astute of you and I like your investigatory skills happy.png

 

Why is this so, I hear you asking.

 

That is because, it looks like the Nintex Forms rules are being evaluated from the bottom up.

RulesOrderOriginal.png

Notice the rules above.  If we evaluate these rules from the bottom up, we look at the Tab2 rule and that will evaluate to false, since we select All Tabs and it will therefore SHOW the Tab2 panel.  It will then evaluate the Tab1 rule and it will also evaluate to false and it will show the Tab1 panel.  But since there Tab2 panel is already visible, it will automatically show the Tab1 panel below the Tab2 panel.

 

You can drag the rules and reorder them.  eg. drag the Tab1 Hide Rule and put it under the Tab2 Hide Rule.

 

RulesOrder.png

Now when you run the form, you'll see that when you select the All Tabs tab, it will show the panels in the expected order.

AllTabsSelectedReordered.png

 

I've attached the example form from this post, so please download it and import it into your SharePoint (on-prem) environment into a dummy list you created and see how it works.

Thanks so much for this Vadim...you're right that's it's simple, but so easy to overlook too!

I've been working with a customer where we decided to take an existing large form and break it into sub-sections (tabbed panels)...having implemented it, they now think some users may find the navigation complex. Now after 2 minutes of tweaking the rules I can offer the best of both worlds or at least easily demo the impact of seeing all panels at once without disrupting the form design too much.


Fantastic.  This worked well on a tabbed form to create a "printable version" in the last tab with all the fields on one page.  Thanks a lot.


Reply