JavaScript Code for Terminating If All Values are 4, 5, or 6 | XM Community
Skip to main content
Solved

JavaScript Code for Terminating If All Values are 4, 5, or 6

  • December 25, 2023
  • 3 replies
  • 54 views

Forum|alt.badge.img+3

 

How do you write JavaScript code for this situation? : 

[Terminate If all values are equal to 4, 5, or 6]

 

 

 

I would appreciate if anyone can help with this. Thanks!

Best answer by ArunDubey

If your scale recodes are not in sequence then you can apply logic like this.

 

 

3 replies

Deepak
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+46
  • 1555 replies
  • December 26, 2023

@hachiware10 

You don’t need javascript you can use custom validation for this.


ArunDubey
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+41
  • QPN Level 8 ●●●●●●●●
  • 589 replies
  • December 26, 2023

Put your question in separate block.

click add below and select Branch.


Then under the branch, click add a new element here option and select End of survey Module.
 

Customize the setting of end of survey module. and click OK

 

Then click on Add a condition and apply terminate logic.
 

But make sure your scale code should be in sequence for that logic.


ArunDubey
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+41
  • QPN Level 8 ●●●●●●●●
  • 589 replies
  • Answer
  • December 26, 2023

If your scale recodes are not in sequence then you can apply logic like this.