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

Scarlet Knight
  • 139
  • 4
  • 10

1 Answers1

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")
Zsuzsa
  • 417
  • 5
  • 14
  • assuming that you are allowed to use iron python for solving the problem – Zsuzsa May 10 '15 at 16:19
  • 1
    I'm pretty sure this won't work in the web player as requested. – flux Jul 28 '15 at 15:12
  • 1
    This script not works for web player, can anybody tell how to show a message box in web player? – Rax Oct 04 '16 at 13:08
  • @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: https://community.tibco.com/wiki/getting-started-c-extensions-tibco-spotfirer – Georgi Koemdzhiev Oct 02 '19 at 08:54