Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to set 'none - none' for cascading field using Behaviour?

Teja
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 Champions.
August 4, 2021

Hi,

I have been trying to set some default value for cascading field based on another cascading field, I think I can able to set the value but could not able set the none - none value when others value has been set.

This article helps me to get cascading field value and This library helps me to set value for cascading field.

Ex: 

User selects

Cascading 1 -> A1 - AA1

Behavior sets

Cascading 2 -> X1 - XX1

When users change the value of Cascading 1 other than A1 - AA1, the cascading 2 still shows X1 - XX1, I wanted to set it to none - none for Cascading 2.

My script looks like

def selectListField = getFieldById(fieldChanged)
def selectListValue = selectListField.value

if (selectListValue.size() > 1 && (selectListValue[1] == "Framework & Tools" || selectListValue[1] == "Operational Efficiency" || selectListValue[1] == "Strategic Tech")) {
field.setFormValue([parentOption.optionId, childOption.optionId])
}

if (selectListValue.size() > 1 && selectListValue[1] == "Internal Integration") {
field.setFormValue([parentOption1.optionId, childOption1.optionId])
}

if (selectListValue.size() > 1 && selectListValue[1] == "Reduce Cost of Implementations") {
field.setFormValue([parentOption1.optionId, childOption2.optionId])
}
else{
field.setFormValue([null, null])
}

Regards
T

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Andy Heinzer
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 Champions.
January 31, 2019

Hi Justin,

I see that you created a support request for this issue in https://getsupport.atlassian.com/servicedesk/customer/portal/23/JST-447882

It appears that this issue has already been resolved from looking at that ticket. 

For other users that might come across this post, it appears that in this case there was a problem that required the plugin vendor, Adaptavist, to get directly involved.  While our support team is happy to try to help out with working with vendors, in cases like this that directly relate to the functionality of a 3rd party plugin you can also reach out to that vendor directly.  In the case of this specific plugin you could use the following link Adaptavist product support request in order to create a support request with the vendor directly.

Regards,

Andy

TAGS
AUG Leaders

Atlassian Community Events