HR

Hi Community,

there's a little problem that's annoying me right now while developing a report for ARIS 9.8.

I have a dialog window, where I among others want to select a text from a ComboBox and save this into an array. And this several times in a row without leaving the dialog.

Let's assume I have the following list:

aMod[0] = "A"

aMod[1] = "B"

aMod[2] = "C"

aMod[3] = "D"

The first time I call the selection everything is fine. I see on the ComboBox the first entry "A". If I select another (e.g. "C"), the other text will be saved into the resulting array aTxt. If I don't change the selection the first entry will be saved.

The next time I call the selection I expect to see the first entry "A" again. But instead I see the former selected entry "C". I can select another (e.g. "B") and the other will be saved.

The worst case is when I call the selection once again and do not change it. The former selection is displayed "B". But the first entry "A" will be saved into aTxt. It seems as if the selection index set with setSelection() in the ComboBox does not match the displayed selection index.

I also tried to use the getValue() function instead of the getSelection(). But the behavior is the same.

The setValue() function instead of the setSelection does not work. Obviously there is no setValue() function for this type of objects.

The procedure is like this:

I press the button BNew, make my selection in the ComboBox and confirm it with the button BApply. Then the selected text is saved into a new record in aTxt.

Before pressing the BNew-button and after pressing the BApply-button the ComboBox is not enabled and not visible. It's not sure that the items of the selection list aMod are the same every time. Therefore aMod is reloaded every time the selection is activated.



function DIA_configSubDialog()

{

    var aTemplate = new Array();

    this.getPages = function()

    {

        var aMod = getMod();

        aTemplate[0] = Dialogs.createNewDialogTemplate(1170, 600, "Dialog");

        ...

        aTemplate[0].ComboBox(900, 330, 20, 20*aMod.length, aMod, "CBMod");

        ...

    }



    this.BNew_pressed = function()

    {

        var aPages = new Array();

        var aMod   = getMod();

        aPages[0].getDialogElement("CBMod").setEnabled(true);

        aPages[0].getDialogElement("CBMod").setVisible(true);

        aPages[0]  = this.dialog.getPage(0);

        aPages[0].getDialogElement("CBMod").setItems(aMod);

        aPages[0].getDialogElement("CBMod").setSelection(0);

        ...

    }

    this.BApply_pressed = function()

    {

        var aPages = new Array();

        

        aPages[0]  = this.dialog.getPage(0);

        aTxt       = createRec(aTxt, aPages);

        ...

    }



function createRec(aTxt, aPages)

{

    var aMod;

    var sMod;

    var nMod;

    var nIdx;

    aMod = aPages[0].getDialogElement("CBMod").getItems();

    nMod = aPages[0].getDialogElement("CBMod").getSelection();

    sMod = aMod[nMod];

    nIdx          = aTxt.length;

    aTxt[nIdx]    = new Array();

    aTxt[nIdx][0] = sMod;

    ...

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

    aPages[0].getDialogElement("CBMod").setVisible(false);

    return aTxt;

}



Can anyone help me tell me what I've done wrong?

What I want is that every time I call the selection the first item is displayed in the ComboBox and that I get the item that's selected. Completely independent of how often the selection was called and whether the selection was changed or not.

Many thanks in advance for your effort.

Greetings Holger

by Kay Fischbach
Posted on Wed, 11/28/2018 - 15:19

Are you by any chance using ARIS Version 9.8.5?

There is an other ARIS user that had a problem (found a bug) with combo-boxes in that ARIS version:

https://www.ariscommunity.com/users/rocks1996/2018-08-10-macro-setselection-doesn-t-work-combobox

They somehow solved their problem (couldn't look further into it, simply because we are already using ARIS 10 and I get a different behavior - a behavior that I expect). Maybe their explanation can help you?

0
by Holger Reidemeister Author
Posted on Thu, 11/29/2018 - 06:54

Thanks Kay for the clarification. I had already doubted myself.

A change to ARIS 9.8.5 is currently not feasible for us. For this I would have to re-install our server and the local clients of all the modelers. And that's not a good idea in the current phase, especially as our project only runs until the end of the year.

As known today there will be a follow-up project and then we will surely go to ARIS 10. Anyway, this bug is another good argument for this. :-)

 

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
  • Profile picture for user freddy
  • Profile picture for user mikhubb
  • Profile picture for user harryratia
  • DC
  • ВА
  • PacMan

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