New Ranks & Badges For The Community!
Notice something different? The ranks and associated badges have gone "Star Fleet". See what they all mean HERE
Highlighted
Commodore Commodore
Commodore
2551 views

Pop -Up Message Box Use (Javascript)

Jump to solution

Dear All; 

 

I have a question. how can i use javascript function on Pop Up Message Box  any idea 

 

If you know could you give me example ? 

 

I added Attach on case

 

Best regards

0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.. Absent Member..
Absent Member..

Hi

 

To add to what Audrey has already contributed, if you are looking for a way to perform some checks and then display a message, you can do something like this in your Rule Set:

 

1. Call Javascript to perform checks using the "Run Javascript" rule 

e.g. vars.$L_my_custom_flag=system.library.{script name}.{function name}(arg1, arg2, ...);

 

2. Validate the check and display an error using the "Run Javascript" rule which can stop an update or transition from occurring

e.g. condition $L.my.custom.flag=true, then use the following script

 

returnCode=1;
msgType="screen";
message="Error message";

 

3. Validate the check and display an information / success message using the "Popup Message Box" rule as described by Audrey

e.g. condition $L.my.custom.flag=false

 

Regards

Matt

View solution in original post

0 Likes
3 Replies
Highlighted
Fleet Admiral
Fleet Admiral

Hi,

 

One example would be if you wanted to call an scmessage record.  For example, in the Javascript (set variable message): you could put:

 

message = system.functions.scmsg(181, "us");

 

Or perhaps you want to reference a field value in your ticket in the message.  Something like:

 

message = "Are you sure you want to move your ticket to "+record.status+"?";

 

Audrey

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Hi

 

To add to what Audrey has already contributed, if you are looking for a way to perform some checks and then display a message, you can do something like this in your Rule Set:

 

1. Call Javascript to perform checks using the "Run Javascript" rule 

e.g. vars.$L_my_custom_flag=system.library.{script name}.{function name}(arg1, arg2, ...);

 

2. Validate the check and display an error using the "Run Javascript" rule which can stop an update or transition from occurring

e.g. condition $L.my.custom.flag=true, then use the following script

 

returnCode=1;
msgType="screen";
message="Error message";

 

3. Validate the check and display an information / success message using the "Popup Message Box" rule as described by Audrey

e.g. condition $L.my.custom.flag=false

 

Regards

Matt

View solution in original post

0 Likes
Highlighted
Commodore Commodore
Commodore

it works .

Thank you for helping 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.