The CreatorCon Call for Content is officially open! Get started here.

Changing field color based on Null Variable

Walter Toney
Tera Expert

ok let me explain this better..

 

i have a Multi Line Text Field  "Field1"  and i am using that field to Turn the Color of the text and backgroud of another Date Field "Field2" if "Field1" is not NULL

 

I know i can do it with out code but our requirement is that we need "field1" not being null to turn it 

i have tried the following 

 

javascript:current.justification_for_urgent_request != "" ;

javascript:current.justification_for_urgent_request != '' ;

javascript:current.justification_for_urgent_request != null ;

javascript:current.justification_for_urgent_request != ;

 

but nothing seems to be working and i don't fully understand why... any thoughts

15 REPLIES 15

Hi,

please share your field style configuration

are you using correct field name here?

if it's custom table then should the field name not start with u_

u_justification_for_urgent_request

javascript:current.u_justification_for_urgent_request != "" ;

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

find_real_file.png

we changed the name of the U-field because they thought it was to long...

but it's the same as justification_for_urgent_request across the board

Hi,

can you share the field configuration screenshot?

is the field u_urgent_justification present on RED Request table?

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

DrewW
Mega Sage

Have you tried one of the following

javascript:!current.u_justification_for_urgent_request;

javascript:current.u_justification_for_urgent_request.toString() != "";