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
Spotifre Message dialog Box action
Asked Answered
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")
assuming that you are allowed to use iron python for solving the problem –
Pivot
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.