Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

How to getValue of multiple choice field in client script

Ankita9793
Tera Contributor

Hi All,


How to getvalue of a multiple choice field in client script? I tried using getvalue/ getDisplayValue but it doesn't work.
Please refer below client script and screenshots. TIA!!

 

function onChange(control, oldValue, newValue, isLoading) {
    if (isLoading || newValue == '') {
        return;
    }
    var ipAddresses = g_form.getValue('enter_ip_addresses');
    var type = g_form.getValue('smtp_relay_authentication_type');
    var t = g_form.getDisplayValue('smtp_relay_authentication_type');

    alert('type', + t + type + g_form.getDisplayValue('smtp_relay_authentication_type'));


Capture.PNGCapture1.PNG 

 
1 ACCEPTED SOLUTION

Shruti
Mega Sage
Mega Sage

Hi,

Ensure that you concatenate the strings and variables correctly within the alert function.The "+" operator should be used without a comma.

alert('type' + t + type + g_form.getValue('smtp_relay_authentication_type'));

View solution in original post

1 REPLY 1

Shruti
Mega Sage
Mega Sage

Hi,

Ensure that you concatenate the strings and variables correctly within the alert function.The "+" operator should be used without a comma.

alert('type' + t + type + g_form.getValue('smtp_relay_authentication_type'));