change table

nameisnani
Mega Sage

Hi Team , 

 

On change table I have created new field called ' Back Out Options' .

 

nameisnani_0-1717639783746.png

 

to show info message i have created onchange cilent script 

nameisnani_1-1717639869442.png

 

After saving the form Info message is removed . It has to be there .what steps i have take please help me here .

 

nameisnani_2-1717640032280.png

 

Thanks in advance 

1 ACCEPTED SOLUTION

Community Alums
Not applicable

@nameisnani 

 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
    if (newValue === '') {
        return;
    }
    if (isLoading) {
        if (newValue == 'tested backout') {
        g_form.showFieldMsg('u_backout_options', 'This specific change has been implement in NonProd or Prod and backed out successfully', 'info');

    } else if (newValue == 'untested backout') {
        g_form.showFieldMsg('u_backout_options', 'Back Out procedure is documented and available but has not been tested', 'info');
    } else if (newValue == 'no back out') {
        g_form.showFieldMsg('u_backout_options', 'This change cannot be backed out', 'info');
    }
		return;
    }

if (newValue == 'tested backout') {
        g_form.showFieldMsg('u_backout_options', 'This specific change has been implement in NonProd or Prod and backed out successfully', 'info');

    } else if (newValue == 'untested backout') {
        g_form.showFieldMsg('u_backout_options', 'Back Out procedure is documented and available but has not been tested', 'info');
    } else if (newValue == 'no back out') {
        g_form.showFieldMsg('u_backout_options', 'This change cannot be backed out', 'info');
    }

}

View solution in original post

5 REPLIES 5

Community Alums
Not applicable

Hi @nameisnani ,

 

Separate isloading & newValue in line 2 & Try adding the code (line 6 to 13) in isloading.

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
    if (newValue === '') {
        return;
    }
    if (isLoading) {
        Your code from line 6 to 13
		return;
    }

```Your code from line 6 to 13

}

 

If my answer helped you in any way, please mark it as helpful or correct.

nameisnani
Mega Sage

@Community Alums 

 

I got confused , could you please provide me the complete script . 

 

Below is my current script.

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

    if (newValue == 'tested backout') {
        g_form.showFieldMsg('u_backout_options', 'This specific change has been implement in NonProd or Prod and backed out successfully', 'info');

    } else if (newValue == 'untested backout') {
        g_form.showFieldMsg('u_backout_options', 'Back Out procedure is documented and available but has not been tested', 'info');
    } else if (newValue == 'no back out') {
        g_form.showFieldMsg('u_backout_options', 'This change cannot be backed out', 'info');
    }


}

Community Alums
Not applicable

@nameisnani 

 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
    if (newValue === '') {
        return;
    }
    if (isLoading) {
        if (newValue == 'tested backout') {
        g_form.showFieldMsg('u_backout_options', 'This specific change has been implement in NonProd or Prod and backed out successfully', 'info');

    } else if (newValue == 'untested backout') {
        g_form.showFieldMsg('u_backout_options', 'Back Out procedure is documented and available but has not been tested', 'info');
    } else if (newValue == 'no back out') {
        g_form.showFieldMsg('u_backout_options', 'This change cannot be backed out', 'info');
    }
		return;
    }

if (newValue == 'tested backout') {
        g_form.showFieldMsg('u_backout_options', 'This specific change has been implement in NonProd or Prod and backed out successfully', 'info');

    } else if (newValue == 'untested backout') {
        g_form.showFieldMsg('u_backout_options', 'Back Out procedure is documented and available but has not been tested', 'info');
    } else if (newValue == 'no back out') {
        g_form.showFieldMsg('u_backout_options', 'This change cannot be backed out', 'info');
    }

}

nameisnani
Mega Sage

@swathisarang98  , could you please help me here .