Priyank Dwivedi Posted December 21, 2023 Share Posted December 21, 2023 I intend to show a progress bar using SPotfire's "ProgressService" and refer to this article :https://community.spotfire.com/s/article/How-to-Add-Progress-Bar-and-Cancellation-Option-when-Executing-IronPython-Scripts-in-TIBCO-SpotfireIn my scenario, the table that is being reloaded is added as an 'information link' and runs an SQL procedure based on certain parameters. The code seems to work fine but the progress bar dialog shows up for "5" seconds based on the time.sleep syntax. There are two issues with this code:1) The data refresh only starts after the dialog is automatically closed down (timer = 5 sec)2) How can I keep the dialog until the data refresh is completed?# Tables(s) to refresh - change/add more if requiredTbls = List[DataTable]()Tbls.Add(Document.Data.Tables['PD_OUTLOOK_GROSS_ROLLUP_TBL']) ps = Application.GetService[ProgressService]()def ex(): try: ps.CurrentProgress.ExecuteSubtask("Retrieving and Formatting Data") Document.Data.Tables.RefreshAsync(Tbls) time.sleep(5) ps.CurrentProgress.TryReportProgress() ps.CurrentProgress.CheckCancel() print('A') except: #pass traceback.print_exc() print('B')ps.ExecuteWithProgress("Data Retrieval", "Retrieving and Formatting Data for Report", ex) Link to comment Share on other sites More sharing options...
Priyank Dwivedi Posted December 21, 2023 Author Share Posted December 21, 2023 @Jose Leviaguirre @Fredrik Rosell Could you please suggest if there is any workaround? Our users really would like to be notified when an ironpython script is running. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now