What is this scriptrunner error?

Julia
Contributor
August 22, 2022

I am trying to do a few if/else if statements to modify the values of escalationSubType based on the value of escalationType. Can anyone help me with this sytax error?  Screen Shot 2022-08-22 at 2.42.20 PM.png

1 answer

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 22, 2022

We can't tell you, you've snapped a screenshot where the pop-up box is obscuring the error.

Julia
Contributor
August 22, 2022

The pop up box is the error and it is for the red underlined portion

[it.optionId.toString())]: it.value ] 

Julia
Contributor
August 22, 2022

Screen Shot 2022-08-22 at 2.56.21 PM.png

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 22, 2022

Ok, now we can check what is behind it, we can point you to the } that is place in line 3 too early in the code, before the .collectentries.

Julia
Contributor
August 22, 2022

Where should it go? 

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 22, 2022

I don't know, I can't work out what your code is supposed to be doing.

Julia
Contributor
August 23, 2022

There are two fields, Escalation Type and Escalation Sub-Type. 

Based on the value of Escalation Type, I want only certain values in "Escalation Sub-Type" to be selectable 

Screen Shot 2022-08-23 at 8.21.02 AM.png

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 23, 2022

Ah, thank you, that's sorted out my confusion!

Have a look at https://library.adaptavist.com/entity/set-behaviour-multi-and-single-select-options-and-value - I think that does what you are looking for!

Suggest an answer

Log in or Sign up to answer