I can't seem to make the Table object work in my dialog boxes. The problem is, I don't even know what I'm doing wrong, what attribute I'm not filling right...
I don't have a specific question; instead, I would like to know if someone could show me a simple working code for a dialog box with a 2 columns and 2 rows table, so that I could understand how do they work, since the official documentation doesn't have any example for it.
Oi Celso,
Did you search ARIS Community for report script code? You could conveniently do that via Google:
https://www.google.de/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=report%20table%20site%3Aariscommunity.com
Doing so you would find ARIS scripting tutorials, a collection of posts about ARIS report scripts:
http://www.ariscommunity.com/users/eva-klein/2010-04-27-aris-scripting-tutorials
Among them Output models as table might be what you are looking for:
http://www.ariscommunity.com/users/mwz/2010-05-11-output-models-table
Um abraço
Rune
Hello Celso,
the scripting tutorials cover custom dialog coding in part 6 and part 10
As another source of inspiration I studied the off the shelf report scripts by SAG like "create process manual".
i can't offer you a working example, but in this post is included a complete user dialog script example, apparently from ARIS 9 Script Help.
Regards, Martin
fDialog() var gUserDialog=null function fDialog(){ var aHeaders = ["", "Support type"] var aColProps = [Constants.TABLECOLUMN_BOOL_EDIT, Constants.TABLECOLUMN_SINGLELINE] var aColWidths = [10, 90] var TableProps = Constants.TABLE_STYLE_DEFAULT // create template var Template = Dialogs.createNewDialogTemplate(0,0, 540, 140, "Caption", "fEvents"); // create table Template.Table( 8, 40, 530, 130, aHeaders, aColProps, aColWidths, "tblSupportTypes", TableProps) Template.OKButton() Template.CancelButton() // create dialog gUserDialog = Dialogs.createUserDialog(Template); // show dialog and get Result var Result = Dialogs.show(gUserDialog) } function fEvents (psDlgItem, plAction, plSuppValue){ var lbReturn = false; // diag continues // = true diag ends switch(plAction){ case 1: // init // set values in table var aTableValues =[ true, "Common" , true, "Logical G/T supported" , true, "Local" , true, "Other"] gUserDialog.setDlgListBoxArray("tblSupportTypes", aTableValues); break; case 2: // CheckBox, DropListBox, ListBox or OptionGroup: value has been changed // CancelButton, OKButton or PushButton has been pressed break; case 3: // ComboBox or TextBox the text has been changed break; case 4: // DlgItem retains the focus. SuppValue is the item that loses focus (index, 0 based). break; case 5: // Idle processing break; case 6: // Fiekey (F1-F24) has been pressed. break; case 7: // The user has double clicked on a table or an item in a list. // get row nr var lRowNr = gUserDialog.getDlgTableValue("tblSupportTypes").getY(); // sets the selected column and row. gUserDialog.setDlgTableValue("tblSupportTypes", 0 , lRowNr) break; case 8: // TableEditChange break; } return lbReturn; }