Forums

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

Using BEHAVIORS, how do I hide a field based on the Summary?

Marc Jason Mutuc
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.
March 22, 2019

I'm using this but it just won't work

def Field1 = getFieldById("customfield_11111")

def Field2 = getFieldById("summary")

if (Field2.getFormValue() == "Show the Field")
{

Field1.setHidden(false)

}

else

{

Field1.setHidden(false)

}

 

1 answer

1 accepted

0 votes
Answer accepted
Mark Markov
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.
March 22, 2019

Hello @Marc Jason Mutuc 

try to use getValue instead of getFormValue

def Field1 = getFieldById("customfield_11111")

def Field2 = getFieldById("summary")

if (Field2.getValue() == "Show the Field")
{

Field1.setHidden(false)

}

else

{

Field1.setHidden(false)

}
Marc Jason Mutuc
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.
March 24, 2019

Works! Thanks Mark! Nice name by the way! Woot woot!

Mark Markov
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.
March 27, 2019

You re welcome, Marc! ;)

Suggest an answer

Log in or Sign up to answer