Set annotation follow choice of field has type is multiple choice

Dinh Nguyen
Kilo Sage

I have a problem with the following requirement :

If i choose "Value 1" of field "Test Choice" => It's will show annotation is "Text A"

else choose "Value 2" of field "Test Choice" => It's will show annotation is "Text B"

Is there any solution ? Please someone help me ! Thank you so much

DinhNguyen_0-1691507538694.pngDinhNguyen_1-1691507578258.png

 

2 ACCEPTED SOLUTIONS

Hemanth M1
Giga Sage
Giga Sage

Hi @Dinh Nguyen ,

 

it not good idea to change the toop tip/instructions on the fly However you can have on change catalog client scipt to update field messages 

ex scrript:

function onChange(control, oldValue, newValue, isLoading) {
    if (isLoading || newValue == '') {
        return;
    }

    if (newValue == "Value1") {
        g_form.showFieldMsg("test_choice", "Selected value1");
    } else if (newValue == "Value 2") {
        g_form.showFieldMsg("test_choice", "Selected value2");
    }

    //Type appropriate comment here, and begin script below

}

HemanthM1_0-1691511286644.png

Result :

HemanthM1_1-1691511320782.png

 

HemanthM1_2-1691511337172.png

 

 

 

Accept and hit Helpful if it helps.

Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025

View solution in original post

Samaksh Wani
Giga Sage
Giga Sage

Hello @Dinh Nguyen 

 

Instead of Annotation you can add Field Message on onChange Client Script :-

 

g_form.showFieldMsg();

 

Plz Mark my Solution as Accept and Give me thumbs up, if you find it helpful.

 

Regards,

Samaksh

View solution in original post

3 REPLIES 3

Hemanth M1
Giga Sage
Giga Sage

Hi @Dinh Nguyen ,

 

it not good idea to change the toop tip/instructions on the fly However you can have on change catalog client scipt to update field messages 

ex scrript:

function onChange(control, oldValue, newValue, isLoading) {
    if (isLoading || newValue == '') {
        return;
    }

    if (newValue == "Value1") {
        g_form.showFieldMsg("test_choice", "Selected value1");
    } else if (newValue == "Value 2") {
        g_form.showFieldMsg("test_choice", "Selected value2");
    }

    //Type appropriate comment here, and begin script below

}

HemanthM1_0-1691511286644.png

Result :

HemanthM1_1-1691511320782.png

 

HemanthM1_2-1691511337172.png

 

 

 

Accept and hit Helpful if it helps.

Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025

Hi @Dinh Nguyen ,

 

did this response help, if so

 

 

Accept and hit Helpful if it helps.

Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025

Samaksh Wani
Giga Sage
Giga Sage

Hello @Dinh Nguyen 

 

Instead of Annotation you can add Field Message on onChange Client Script :-

 

g_form.showFieldMsg();

 

Plz Mark my Solution as Accept and Give me thumbs up, if you find it helpful.

 

Regards,

Samaksh