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

OnChange Client script on Condition type field

punitchourey
Tera Contributor

Hi All,

I have created a custom table. There is column called Condition whose type is condition.

Condition is as below:

[caller] [changes/is/.......] [value]

I want to create an OnChange client script whenever the condition changes.

I have created the OnChange client script on Condition field however that is not working.

When i change the field from Condition to any other field for ex  - Task which is a true/false field, client script works but not does not work for Condition field.

 

Thanks,

Punit

 

15 REPLIES 15

punitchourey
Tera Contributor

Hi Chuck,

Since in the condition field, we can select one of the condition as caller. 

But if we add additional reference field (caller), users may come up and say that we already can select the caller from condition field and why we need to select it from a new reference field.

 

Thanks,

Punit

What is the condition field providing you that you cannot get with a discrete reference field to caller? Are you actually evaluating/matching records on the condition field? 

Please provide an example of a condition that does not use the caller field and how is it used?

punitchourey
Tera Contributor

Hi Chuck,

 

PFB screenshot of the condition;

find_real_file.png

if caller changes, then on click of reference field(Support Offering), it should show only those Support Offerings to which selected user in the condition belongs to.

 

 

punitchourey
Tera Contributor

Hi Chuck,

 

In addition to this - Support Offering is a separate reference field. It is not part of condition.

Support Offering - L1 shown in screenshot is different than the Support Offering

Jon G Lind
ServiceNow Employee
ServiceNow Employee

Actually, you can enable on change scripts by adding the attribute "readable=true".  Go to the dictionary entry, click "Advanced" and add this to attribute field.  E.g., mine looks like this:

 

condition_builder=v2,readable=true,staticDependent=incident,show_condition_count=true