How to show Annotation section , based on 3 conditions using onChange Client script.

Neelavathi M
Tera Contributor

Hi All,

I have a requirement to show Annotation section, if 3 conditions are satisfied and  these 3 condtions are from 3 individual fields which are choice type.

 

NeelavathiM_0-1738949489306.png

and I have written a onChange client script for achieving this , but i am able get only 1st field value , others are coming as empty , so condition is not satisfying to show Annotaion section.

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
    if (isLoading || newValue === '') {
        return;
    }
    var a1= g_form.getValue('compliance_risk');
    var a2= g_form.getValue('complexity_risk_global_and_functional');
    var a2= g_form.getValue('operational_risk');
	alert('1st--'+ a1);
	alert('2nd--'+a2);
	alert('3rd--'+a3);
    if (a1== 'yes, direct impact' && a2== 'global department' && operationalrisk == 'Yes, Quality Agreement '){
        $('primPurpose').up().show();
        g_form.setDisplay('primary_purpose_of_document', true);
        //Type appropriate comment here, and begin script below

    }
}

 

 

 

So please suggest me how to achieve this requirement.
Appreciate your support.

 

Thanks.

 

10 REPLIES 10

Where can we find the Annotation ID ? 
I have a custom annotation box and in annotation details <span id = 'my id'> Text </span>
Here when I am using this 'my id' then it's hiding the text, but empty blue box is still appearing.
Any idea on this how can we hide the annotation box?