Cerys
Scholar

Hide panel based on choice field

Jump to solution

I have a choice field with the following options 

 

APPROVE
APPROVE WITH COMMENTS

REJECT
REJECT WITH COMMENTS

I would like a panel with a multi line text box to only show if either of the two options 'with comments' are selected. At the moment I can only get one to work using the following rule. When I tried to add an or() function it would not work.

Cerys_0-1656488703112.png

 

 

0 Kudos
Reply
3 Replies
Garrett
Communicator

Re: Hide panel based on choice field

Jump to solution

Hi @Cerys 

 

Easy fix...

The Choice control

Name: "Outcome"

Format: Option button 

Value: "1|APPROVE,2|APPROVE WITH COMMENTS,3|REJECT,4|REJECT WITH COMMENTS"

Garrett_0-1656492724448.png  

Garrett_1-1656492761570.png

 

The Panel (with the Multiline Text Field)

ShowComments Rule

Garrett_2-1656492883367.png

( Outcome == "2" || Outcome == "4")

 

HideComments Rule

Garrett_3-1656492996149.png

Not( Outcome == "2" || Outcome == "4")

 

That should do the trick

 

PS: For the Choice control,

instead of using "APPROVE, REJECT" where OUTCOME value will be "APPROVE" or "REJECT"

I'm using "1|APPROVE, 2|REJECT" where OUTCOME value will be "1" or "2

Reply
Cerys
Scholar

Re: Hide panel based on choice field

Jump to solution

Hi @Garrett, this worked perfectly, thank you!

0 Kudos
Reply
Garrett
Communicator

Re: Hide panel based on choice field

Jump to solution

Hey, You're most welcome @Cerys 

 

 

 

Reply