Ildsborg
Scholar

Form: Show/Hide Panels in Survey

Jump to solution

Hi All!

I have a form which should look like a survey where I have several questions with YES and NO answers. And depending of the previous answer it should show the next question.

I have been using show and hide panels: != "Yes" or != "No".  

I want this to happen:

Question 1: if YES go to 2A, if NO stop
Question 2A: if YES go to 3A, if NO to 2B
Question 2B: if YES go to 3A, if NO stop
Question 3A: if YES stop, if NO go to 3B
Question 3B: if YES stop, if NO go to define

 

The problem arises when you get to question 3A, you can get here in 2 ways:

- first: option: YES, YES

- second option: YES, NO, YES

 

Via the first option the form works as it should. But via the 2nd option it doesnt show any panels.

 

Hopefully someone can help me, thanks in advance!

M.

0 Kudos
Reply
14 Replies
Garrett
Contributor

Re: Form: Show/Hide Panels in Survey

Jump to solution

Hi @Ildsborg, could you provide additional details?

 

Which type of Form are you using, Classic Form or a Responsive Form?

Can the user backtrack? When they reach 3A, can the user change Question 1 to NO?

Can you share the rules for 3A? Screenshot, please

0 Kudos
Reply
Ildsborg
Scholar

Re: Form: Show/Hide Panels in Survey

Jump to solution

Thanks a lot  for getting back to me faster!

>> Which type of Form are you using, Classic Form or a Responsive Form?<<

I am using Classic Form in SharePoint 2019.

>> Can the user backtrack? When they reach 3A, can the user change Question 1 to NO? <<
Yes, they can backtrack to Question 1 to "NO" when they reach to Question 3A. But the question 3A is visible which should not be.

 

Q1toNo.png

 

>> Can you share the rules for 3A? Screenshot, please <<

Question 2A: if YES go to 3A, if NO to 2B
Condition: Question2A!= "Yes" 

I tried to add another condition for the Question 3A in the same rule, but it didn't work.

Question 2B: if YES go to 3A, if NO stop

Condition: Question2B!= "Yes"

I also create an identical 3A question and added the condition: Question2B!= "Yes", but it didn't work either. I tried other several things without the result that I want. How can I apply two conditions for Question 3A in a single rule? Or how can we solve this?

 

Q3A-Condition.png

 

Besides, the questions of the tab of "Option 2" are being shown in the other tabs. I have 4 tabs with its own questions. How can I show the related questions in each of its own tab?

tabs.png

Thanks in advance!

Cheers.

M.

 

 

@Garrett

0 Kudos
Reply
Garrett
Contributor

Re: Form: Show/Hide Panels in Survey

Jump to solution

Hi @Ildsborg 

 

Is this correct?

Nintex-Forms-for-Office-365.gif

 

Panel 1
- Arrival: Do nothing
- Question 1: if YES go to 2A, if NO stop
Panel 2A
- Arrival: when (C1 == YES)
- Hide NOT(C1 == YES)
- Show (C1 == YES)
- Question 2A: if YES go to 3A, if NO to 2B

Panel 2B
- Arrival: when (C1 == YES, C2A = NO)
- Hide NOT(C1 == YES && C2A == NO)
- Show (C1 == YES && C2A == NO)
- Question 2B: if YES go to 3A, if NO stop

Panel 3A
- Arrival1 when (C1 == YES, C2A == YES)
- Arrival2 when (C1 == YES, C2A == NO, C2B ==YES)
- Hide NOT((C1 == YES && C2A = YES) || (C1 == YES && C2A = NO && C2B ==YES))
- Show (C1 == YES && C2A = YES) || (C1 == YES && C2A = NO && C2B ==YES)
- Question 3A: if YES stop, if NO go to 3B

Panel 3B
- Arrival1 when (C1 == YES, C2A = YES, C3A == NO)
- Arrival2 when (C1 == YES, C2A = NO, C2B ==YES, C3A == NO)
- Hide NOT((C1 == YES && C2A == YES && C3A == NO) || (C1 == YES && C2A = NO && C2B == YES && C3A == NO))
- Show (C1 == YES && C2A == YES && C3A == NO) || (C1 == YES && C2A = NO && C2B == YES && C3A == NO)

 

TIP: I just do the Show Rule first. Then duplicate the Rule, Rename it to HideRule and add the NOT function.

 

hopes this helps

0 Kudos
Reply
Garrett
Contributor

Re: Form: Show/Hide Panels in Survey

Jump to solution

Using Code Sample to display monospace fonts for better clarity

 

Panel 1
 - Arrival: Do nothing
 - Question 1: if YES go to 2A, if NO stop
   
Panel 2A 
 - Arrival: when (C1 == YES)
 - Hide NOT(C1 == YES)
 - Show    (C1 == YES)
 - Question 2A: if YES go to 3A, if NO to 2B

Panel 2B  
 - Arrival: when (C1 == YES, C2A = NO)
 - Hide NOT(C1 == YES && C2A == NO)
 - Show    (C1 == YES && C2A == NO)
 - Question 2B: if YES go to 3A, if NO stop

Panel 3A
 - Arrival1 when (C1 == YES, C2A == YES)
 - Arrival2 when (C1 == YES, C2A == NO, C2B ==YES)
 - Hide NOT((C1 == YES && C2A = YES) || (C1 == YES && C2A = NO && C2B ==YES))
 - Show     (C1 == YES && C2A = YES) || (C1 == YES && C2A = NO && C2B ==YES)
 - Question 3A: if YES stop, if NO go to 3B

Panel 3B
 - Arrival1 when (C1 == YES, C2A = YES, C3A == NO)
 - Arrival2 when (C1 == YES, C2A = NO, C2B ==YES, C3A == NO)
 - Hide NOT((C1 == YES && C2A == YES && C3A == NO) || (C1 == YES && C2A = NO && C2B == YES && C3A == NO))
 - Show     (C1 == YES && C2A == YES && C3A == NO) || (C1 == YES && C2A = NO && C2B == YES && C3A == NO)

I just do the Show Rule first. Then duplicate the Rule, Rename it to HideRule and add the NOT

 

0 Kudos
Reply
Ildsborg
Scholar

Re: Form: Show/Hide Panels in Survey

Jump to solution
Thanks!
I was wondering if the rule type should be a Formatting type or Validation type. Besides, I am creating two rules for the Question 2A panel:
ShowRule (C1 == YES) ----> what is C?
and
HideRule NOT(C1 == YES)

But It does not show Question 3A panel as expected. Nothing happens. Perhaps, I am doing something wrong? In addition the user should get a panel with a message when they click the No button. How can I implement that?

Thanks in advance.
0 Kudos
Reply
Garrett
Contributor

Re: Form: Show/Hide Panels in Survey

Jump to solution

Hi @Ildsborg 

 

I should have explain that... You have the various section/panel

Q1Panel (which contains)

  C1 (Choice Yes/No)

  Hide means HidePanel 

  Show means ShowPanel 

 

Garrett_0-1655751727822.png

Garrett_1-1655751764522.png

HidePanel 3A
NOT((C1 == YES && C2A == YES) || (C1 == YES && C2A == NO && C2B ==YES))

 

Garrett_2-1655751916758.png

Garrett_3-1655751945959.png

ShowPanel 3A
(C1 == YES && C2A == YES) || (C1 == YES && C2A == NO && C2B ==YES)

 

Hopes this helps

0 Kudos
Reply
Garrett
Contributor

Re: Form: Show/Hide Panels in Survey

Jump to solution

Question 2A panel: (This are the rules for Panel 2A)
ShowRule ShowPanel (C1 == YES) ----> what is C? The Choice made in Q1
and
HideRule HidePanel NOT(C1 == YES)

 

Garrett_0-1655752877567.png

Panel3A is shown when C1==Yes AND C2A==Yes

 

Garrett_2-1655753192414.png

Panel3A is shown when C1==Yes AND C2A==No AND C2B==Yes

 

Panel 3A
 - Arrival1 when (C1 == YES, C2A == YES)
 - Arrival2 when (C1 == YES, C2A == NO, C2B ==YES)
 - HidePANEL3a: NOT((C1 == YES && C2A == YES) || (C1 == YES && C2A == NO && C2B ==YES))
 - ShowPANEL3A:     (C1 == YES && C2A == YES) || (C1 == YES && C2A == NO && C2B ==YES)
 - Question 3A: if YES stop, if NO go to 3B

 

There is 2 set of Rules for each Panel. One to HIDE the panel and another one to SHOW the panel.

 

Hope this clarifies the rules for you.

0 Kudos
Reply
Ildsborg
Scholar

Re: Form: Show/Hide Panels in Survey

Jump to solution

Thank you, @Garrett ! You rock!!

It works pretty well, but still I have new challenges.
Let me explain:
Question 1: if YES go to 2A, if NO get a message -- > When the user click NO they should go to a panel where there is a Rich Text control with a message.
Question 2A: if YES go to 3A, if NO to 2B
Question 2B: if YES go to 3A, if NO get a message-- > When the user click NO they should go to a panel where there is a Rich Text control with a message.
Question 3A: if YES get a message, if NO go to 3B -- > When the user click YES they should go to a panel where there is a Rich Text control with a message.
Question 3B: if YES get a message, if NO get a message -- > When the user click YES they should go to a panel where there is a Rich Text control with a message.
And when they click to NO, they should get a message or go to Option 3 (TAB).

I added panels with a Rich Text control and rules to:
Question 1: Question1!= "No" and Hide.
Question 2B: Question2B!= "No" and Hide
Question 3A: Question3A!= "Yes" and Hide
Question 3B: Question3B!= "Yes" and Hide,  Question3B!= "No" Hide.

It works more or less with imperfections. If the user click around the survey and go back to the first question, for instance, the panels with the messages stays. Please see what I mean in the image below. Thanks a lot for you time and dedication!

panels.png

 

rules.png

 

 

0 Kudos
Reply
Garrett
Contributor

Re: Form: Show/Hide Panels in Survey

Jump to solution

Hey @Ildsborg 

You're welcome!

Great to hear that you manage to resolve your initial challenge.

You have a better grasp of the logic however it can get pretty complicated if you add panel 9A and 9B.

 

Reading and trying to understand your new requirements...

 

 

 

0 Kudos
Reply