- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Application Dialog ^TABLENAME reference
Dear Community,
I've been struggling for a while now, trying to have a Dialog ^TABLENAME reference filled in an Application Dialog Title.
It seems that it only reacts to a Current DataTable being already loaded when my app is launched.
But this is in fact the purpose of Dialog1, to chose what Data Table to open, starting from nothing:
The issue here is that even though Dialog1 script ends with opening a chosen Data Table, Dialog2 Title TABLENAME remains empty:
I already tried several syntaxes at the end of Dialog1 script, with no change
OnNext1 = Function( {},
file_path = FilePath << GetText();
If ( file_path != "",
//IST Text File
dt = Open(
file_path,
...
);
dt << CurrentDataTable();
CurrentDataTable( dt );
Dialog2 << CreateInstance( dt );
}
Any suggestion on how to push my "dt" Data Table into this ^TABLENAME reference, in a Dialog Title?
Thanks
Senior Simulation & Planning Engineer
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Application Dialog ^TABLENAME reference
Hi Stéphane - unfortunately the ^TABLENAME substitution in Application Builder is only designed to work with the Current Data Table. Application Builder resolves the required data tables at initialization. One table is allowed to come from the Current Data Table at the time the Application launches, and the rest are either identified by name, by file, or are assigned dynamically by the scripts. Data Tables are global to the Application, so there is not a table that is associated with each Module.
Fortunately, there is a straightforward way to set the title directly in the script for the Dialog2 module. The window is created at the point where "thisModuleInstance << Create Objects" is called. After that line, you can add something like:
(thisModuleInstance << Get Box) << Set Window Title("IST Analyser - " || (dt << Get Name));
where dt is the name of the JSL symbol for the data table, as defined in the Dialog2 module. I hope this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Application Dialog ^TABLENAME reference
Thanks a lot Dan,
First solving reply after more than 500 views must be close to a record!
I also found how to avoid hardcoding the app name:
(thisModuleInstance << GetBox) << SetWindowTitle( (thisApplication << GetName) || " - " || (dt2 << GetName));
It works fine as expected now.
Cheers!
Senior Simulation & Planning Engineer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Application Dialog ^TABLENAME reference
Hi Stéphane - unfortunately the ^TABLENAME substitution in Application Builder is only designed to work with the Current Data Table. Application Builder resolves the required data tables at initialization. One table is allowed to come from the Current Data Table at the time the Application launches, and the rest are either identified by name, by file, or are assigned dynamically by the scripts. Data Tables are global to the Application, so there is not a table that is associated with each Module.
Fortunately, there is a straightforward way to set the title directly in the script for the Dialog2 module. The window is created at the point where "thisModuleInstance << Create Objects" is called. After that line, you can add something like:
(thisModuleInstance << Get Box) << Set Window Title("IST Analyser - " || (dt << Get Name));
where dt is the name of the JSL symbol for the data table, as defined in the Dialog2 module. I hope this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Application Dialog ^TABLENAME reference
Thanks a lot Dan,
First solving reply after more than 500 views must be close to a record!
I also found how to avoid hardcoding the app name:
(thisModuleInstance << GetBox) << SetWindowTitle( (thisApplication << GetName) || " - " || (dt2 << GetName));
It works fine as expected now.
Cheers!
Senior Simulation & Planning Engineer