Spotifre Message dialog Box action
Asked Answered
W

1

7

I have a report where, once the user clicks a SAVE button it fires a script. Can I do a dialog box where once the user clicks SAVE, A dialog with "Confirm save ... Yes? No? " pops up and when the user clicks Yes it fires the script? I would like this to work on both the web player and desktop

Wilkes answered 20/4, 2015 at 19:35 Comment(0)
P
5

You can use the following iron python script for solving this:

import clr
clr.AddReference("System.Windows.Forms")
from System.Windows.Forms import MessageBox, MessageBoxButtons
from System.Windows.Forms import DialogResult

dialogResult = MessageBox.Show("Some question", "Some Title", MessageBoxButtons.YesNo)
if(dialogResult == DialogResult.Yes):
    MessageBox.Show("The answer is YES")
else:
    MessageBox.Show("The answer is NO")
Pivot answered 10/5, 2015 at 16:13 Comment(4)
assuming that you are allowed to use iron python for solving the problemPivot
I'm pretty sure this won't work in the web player as requested.Jetton
This script not works for web player, can anybody tell how to show a message box in web player?Lashonda
@Aashi You have to develop a C# Extention. That can target both the WebPlayer and Analyst. You can read here for getting started with that: community.tibco.com/wiki/…Lyall

© 2022 - 2024 — McMap. All rights reserved.