Question
Virtusa
IN
Last activity: 2 Feb 2024 3:54 EST
How to generate alerts like Mandatory popup
Hello
We have a requirement to show the popup just like below when user clicks on a button. Can someone suggest steps to achieve this, please?
Thanks in advance :)
-
Reply
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
GB
@RameshBattini please go through the available documentation:
Pegasystems Inc.
CA
Button Click Event - Launch Flow Action (attached screenshot for your reference).
I hope this helps!
Virtusa
IN
@RameshSangili Hello,
But it is like modal window right? I need window alert.
Pegasystems Inc.
IN
@RameshBattini Can you try below steps
Create text file with JS extension and add below code
function windowspopup() { let text = "Press a button!\nEither OK or Cancel."; window.confirm(text); }
Add this text file in harness in scripts & styles
On click on button Action Run script and give the function name (Here i used function name Windowspopup in textfile)
Please find the screenshots
Virtusa
IN
@Sainath Kokala Hello, Hope your doing good :)
Sorry for the delay in response, I actually tried it on academy and it didn't worked ou :(
Attached the configuration screenshots. Please advice if any :)
Pegasystems Inc.
IN
@RameshBattini Hi you need to give the same function name in the button. You created the function name windowsPopup but in the button & Harness you have given the function name as confirm
Virtusa
IN
@Sainath Kokala Hello, thank you
it did generated, but on click of Ok it is not submitting the form just like in the example I shared in question.