The Message in showFieldMsg is disappearing immediately

uma17
Tera Guru
Hi All,
 
In the below code the message in showFieldMsg is disappearing immediately after appearing. If  we remove the g_form.clearValue() the message stays but the invalid value does not get cleared,
 
if (X > Y) {
        g_form.clearValue('abc'); 
        g_form.showFieldMsg('xyz', 'AAAAAAAAAAAAAAAA, 'error');
        return;
    }
 
Any idea why ?
 
Thanks,
Uma
15 REPLIES 15

Do you have g_form.clearMessages(); on any script that is on the current or parent  table/form

-Anurag

No, I don't have clearMessages() on any of my client scripts on the table.

Not on ui policy scripts

-Anurag

No

Change the order, put clearValue() after the show message()


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution