Profile picture for user freddy

Good day,

I am creating a Dialog through ARIS script using Business Architect 7.1.

In the Aris Script help file I see that you can add a Help Button to your dialog, but it requires a HelpID to be passed through to it.

How can I create my own help file and use it with this HelpButton method?

 

by Torsten Haase
Posted on Wed, 07/29/2009 - 12:02

Sorry, this is not possible so far. Only the reports shipped with the standard product can use the help at the moment. In this case the help is contained in the default help files.

Your issue is a known requirement which will be realized in one of tne next releases.

0
by Torsten Haase
Posted on Wed, 06/18/2014 - 14:00

In reply to by Natalia Elmanova

Hi, you can use HTML instead of a help ID to display a help text in the help tab.

0
by Freddy Barkhuizen Author
Posted on Wed, 07/29/2009 - 16:03

Thanks for the reply, looking forward to the future releases.

Just another thing you can maybe help me with.

I'm now trying a context sensitive help, depending on which control has the focus, I want to change the value of Text control.

I'm using the createNewDialogTemplate method with the sDialogFunc parameter. In the Aris Script help file it gives the following information for the Action parameter:

4: The dialog item DlgItem retains the focus. SuppValue is the item that loses focus (index, 0 based).

But when I run the script, it looks like the code never gets called.

Is Action=4 the right way to check for focus lost and focus gained? What can I be doing wrong If the code is never called?

0
by Torsten Haase
Posted on Thu, 07/30/2009 - 10:57

Instead of using a dialog function I would appreciate using a JavaScript dialog object. This produces better readable code and you can even create multi-page dialogs.

The following example shows a dialog with focus handlers for 2 dialog controls and illustrates the usage of the dialog object:

var test = 0;

var count = 0;

//this function defines the dialog object:

function myDialog()

{

var result;

//returns DialogTemplate[] (see help)

//non-optional

this.getPages = function()

{

var iDialogTemplate1 = Dialogs.createNewDialogTemplate(20, 20, 600, 200, "First page");

iDialogTemplate1.PushButton(10, 5, 20, 20, "<SYMBOL_ARROWUP>");

iDialogTemplate1.PushButton(35, 5, 80, 15, "Press", "BUTTON_1");

iDialogTemplate1.CheckBox(120, 5, 100, 15, "CheckMe", "CHECKBOX_1");

iDialogTemplate1.TextBox(10, 30, 250, 15, "TXT_EDIT_GRAYED");

iDialogTemplate1.TextBox(267, 30, 100, 15, "TXT_EDIT_NORMAL");

iDialogTemplate1.ComboBox(10, 60, 100, 40, ["Value 1", "Value 3", "Value 2", "Value 4"], "COMBO_1");

iDialogTemplate1.DropListBox(355, 60, 100, 40, ["sorted 1", "sorted 3", "sorted 2", "sorted 4"], "COMBO_4", 3); //sortiert + editierbar

iDialogTemplate1.GroupBox(10, 100, 100, 40, "Group Box", "GROUP_1");

iDialogTemplate1.GroupBox(110, 100, 100, 40, "Group Box 2", "GROUP_2");

iDialogTemplate1.Text(15, 120, 80, 16, "a static text", "STATIC_1");

iDialogTemplate1.Text(10, 170, 100, 16, "stat. Text");

iDialogTemplate1.TextBox(120, 170, 100, 16, "TXT_EDIT_1");



var iDialogTemplate2 = Dialogs.createNewDialogTemplate(20, 20, 400, 200, "Second page");

iDialogTemplate2.Text(10, 10, 100, 16, "stat. Text");

iDialogTemplate2.TextBox(10, 40, 100, 16, "TXT_EDIT_2");

iDialogTemplate2.TextBox(10, 80, 150, 16, "TXT_EDIT_3");



return [iDialogTemplate1, iDialogTemplate2];

}



//initialize dialog pages (are already created and pre-initialized with static data from XML or template)

//user can set control values

//optional

this.init = function(aPages)

{

//use this function also to store the page data locally (for example to access it in "onClose")

aPages[0].getDialogElement("TXT_EDIT_GRAYED").setEnabled(false);

//aPages[0].setFocus("TXT_EDIT_1");

aPages[0].getDialogElement("TXT_EDIT_1").setText("Start value 1");



aPages[1].getDialogElement("TXT_EDIT_2").setText("Start value 1");

aPages[1].getDialogElement("TXT_EDIT_3").setText("Start value field 2");

//aPages[1].setFocus("TXT_EDIT_2");

}



// returns true if the page is in a valid state. In this case OK, Finish, or Next is enabled.

// Dialog: see help

//optional. if not present: always true

this.isInValidState = function(pageNumber)

{

count++;

return this.dialog.getDialogElement("CHECKBOX_1").isChecked();

//return true;

}

// returns true if the "Finish" or "Ok" button should be visible on this page.

// Dialog: see help

//optional. if not present: always true

this.canFinish = function(pageNumber)

{

return true;

}

// returns true if the user can switch to another page.

// Dialog: see help

// pageNumber: the current page number

//optional. if not present: always true

this.canChangePage = function(pageNumber)

{

return true;

}



//called after ok/finish has been pressed and the current state data has been applied

//can be used to update your data

// Dialog: see help

// pageNumber: the current page number

// bOK: true=Ok/finish, false=cancel pressed

//optional

this.onClose = function(pageNumber, bOk)

{

if(bOk==true)

result = this.dialog.getDialogElement("TXT_EDIT_2").getText()

else

result = "cancel"

}



//the result of this function is returned as result of Dialogs.showDialog(). Can be any object.

//optional

this.getResult = function()

{

return result;

}



//other methods (all optional): on[ControlID]_pressed, _focusChanged(boolean lost=false, gained=true), _changed for edit and toggle buttons, _selChanged(int[] newSelection)

this.BUTTON_1_focusChanged = function(bFocused)

{

if(bFocused)

this.dialog.getDialogElement("TXT_EDIT_GRAYED").setText("press the button!")

else

this.dialog.getDialogElement("TXT_EDIT_GRAYED").setText("do something else")

}

//other methods (all optional): on[ControlID]_pressed, _focusChanged(boolean lost=false, gained=true), _changed for edit and toggle buttons, _selChanged(int[] newSelection)

this.CHECKBOX_1_focusChanged = function(bFocused)

{

if(bFocused)

this.dialog.getDialogElement("TXT_EDIT_GRAYED").setText("check this to enable the \'Next\' button!")

else

this.dialog.getDialogElement("TXT_EDIT_GRAYED").setText("")

}

//other methods (all optional): on[ControlID]_pressed, _focusChanged(boolean lost=false, gained=true), _changed for edit and toggle buttons, _selChanged(int[] newSelection)

this.BUTTON_1_pressed = function()

{

this.dialog.getDialogElement("TXT_EDIT_2").setEnabled(false)

//this.dialog.getDialogElement("STATIC_1").setText("new value")

this.dialog.getDialogElement("GROUP_1").setVisible(false)

this.dialog.getDialogElement("GROUP_2").setText("new title")

test = 1;

}

}

//shows the dialog using the dialog object "myDialog":

var result = Dialogs.showDialog(new myDialog(), Constants.DIALOG_TYPE_WIZARD, "Multi page dialog sample");

Dialogs.MsgBox(result)

 

0
by N, NGUYEN
Posted on Tue, 08/02/2011 - 09:30

In reply to by sl

Hi, I tried to build a 1-page dialog from the code by removing the second dialog template and its controls. However, I got the button OK disabled and can only enable it by checking the CheckMe checkbox.

Is it possible to make the OK button always enabled?

Thank you,

Nguyen

0
by Sebouh Havatian
Posted on Thu, 12/30/2010 - 11:36

Hi

Good dialog sample.

I have a question:

If I have 2 comboboxes and I want to populate these comboboxes dynamically based on selected values. For example Combobox1 is filled the first. based on the selected value of ComboBox1 I want to populate Combobox2 on run time .

 

I just want to know if this is doable or not.

 

Please Help

 

thanks

0
by Torsten Haase
Posted on Mon, 01/03/2011 - 09:29

Hi!



Yes, this is doable. Just create a handler for the first combo box, which sets the values for the second combo box:



this.COMBO1_selChanged = function(selectionIndexes)

{

    this.dialog.getDialogElement("COMBO2").setItems(["Value 1", "Value 3", "Value 2", "Value 4"])

}

0
by Sebouh Havatian
Posted on Mon, 01/03/2011 - 10:31

Thank you so much

 

this is exactly what I want

 

thanks again

0
by Sebouh Havatian
Posted on Mon, 01/03/2011 - 13:13

Can I add a picture to this dialog?

0
by Sebouh Havatian
Posted on Mon, 01/03/2011 - 17:12

I researched alot today regarding this issue but still I got no result.

I just want to know if its possible to add images to a dialog box using the upper method.

Please advise

 

thanks

0
by Torsten Haase
Posted on Tue, 01/04/2011 - 10:41

I think it is not possible to add images to a dialog page using the new dialog object.

What is missing is a method to set the image data.

0
by Sebouh Havatian
Posted on Tue, 01/04/2011 - 11:38

Thanks for the info.....

 

If I want to add events to the Comboboxes (the previouse post) in the dialog box. Is it possible in the old Dialog?

 

Because I need to put an image on the background of the dialog

 

Please advise

0
by Torsten Haase
Posted on Tue, 01/04/2011 - 12:27

Yes, you can handle combo box selection events in the dialog function of old dialogs. But I've never tried using an image as background image of a script dialog...

0
by Sebouh Havatian
Posted on Tue, 01/04/2011 - 13:28

I have tried to put images on the old dialog and it works fine. But I hav not tried the events.

Can you please guide me how to put this events on the old dialog box?

0
by Torsten Haase
Posted on Tue, 08/02/2011 - 12:06

Hi Mr. Nguyen,

the OK - button is not enabled because of the result of the callback-method "isInValidState". See below. This Method enables you to decide, if the OK (or Next or Finish)-button is enabled. If this method is not present, these buttons are always enabled.



 

// returns true if the page is in a valid state. In this case OK, Finish, or Next is enabled.
// Dialog: see help
//optional. if not present: always true
this.isInValidState = function(pageNumber)
{
count++;
return this.dialog.getDialogElement("CHECKBOX_1").isChecked();
//return true;
}



BR, Torsten

0
by favel lass
Posted on Mon, 10/10/2011 - 14:52

Hi Torsten,

 

I don't know if it's the good place to post but the subject is about a dialog box.

I'm looking to reuse the scale function which appears in some native reports. This function permitts the user to put a personnalized scale for the graphics générated (and permitts automatically to fit the graphics to the word page ant to splitt graphics on multi pages).

I tryed to reuse you sample example in order to get a first box with one button "format graphics" which permits to shiow a second dilaog box where the user can give the personnalized size.

Unfortunately, i don't success and don't know how to code that.

Do you have an example of this dialog box or a way which would permit me to success??

 

Thanks in advance

 

Favel

0

Featured achievement

Rookie
Say hello to the ARIS Community! Personalize your community experience by following forums or tags, liking a post or uploading a profile picture.
Recent Unlocks

Leaderboard

|
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock