Pop-up or Alert message

Ramesh_143
Giga Guru

How can we create a popup or alert message without including the background value or name? Any suggestions from you all..? please provide an example.

3 REPLIES 3

Community Alums
Not applicable

Hi @Ramesh_143 ,

What's your use case?

 

piyushsain
Tera Guru
Tera Guru

Hi @Ramesh_143 

For example use this :

 alert("test alert "+g_form.getLabel('name of the field'));

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,
Piyush Sain

Ehab Pilloor
Mega Sage

Hi Ramesh,

You can create a simple popup or alert message without including the background value or name by using the gs.addInfoMessage() method. This method allows you to display an informational message to the user without the need for additional fields like background or name. You can use this approach in Business Rules or other client-side scripts. Here's an example in the context of a Business Rule:

 

 

(function executeRule(current, previous /*, g*/) {

    // Your condition to trigger the message
    if (current.priority == 1) {
        // Display an informational message without background or name
        gs.addInfoMessage("This incident has Priority 1. Pay attention!");
    }

})(current, previous);

 

This message will appear as a popup at the top of the screen when the Business Rule is triggered and the condition is satisfied. The gs.addInfoMessage() method is suitable for displaying non-blocking information to users without requiring additional background or name values.

 

If you found this reply useful, please mark it as solution/helpful.

 

Thanks and Regards,

Ehab Pilloor