AI

Hi everyone,

In my report I have to give option to the user with dialog box to select a destination folder inside ARIS before further selection of objects and models.

How can I present the user all folders(groups) in database?

Thank you in advance

by Kay Fischbach
Posted on Mon, 06/18/2018 - 13:14

A little bit complicated, but it works:

in your getPages method you add a button to your dialogTemplate

iDialogTemplate1.PushButton(15, 200, 40, 30, "Test", "PB1");

you then add a button-reaction function to your dialog function like this:

this.PB1_pressed = function(){
        this.dialog.setBrowseClientFolders("BCF", "Pick a destination folder", "", false);
}
  • the method above only opens the "Pick a destination folder" dialog, it doesn't return anything
  • this.PB1_pressed goes into the same hierarchy level as the this.getPages function, and has to be called exactly like this (button-item identifier + _pressed)

To catch the returned value, you need another method in your dialog function:

this.BCF_subDialogClosed = function(subResult, bOK){
        if(bOK){
           Context.setSelectedPath(subResult);
        }
    }
  • again, same hierarchy level as the this.getPages function
  • it again has to be called exactly as described (sub-dialog-identifier + _subDialogClosed)

As long as you create your output object with Context.createOutputObject() this should work - it doesn't matter if you created the output object before or after the dialog execution (at least that's the case for me, with ARIS 10.0.3).

I hope this helps.

EDIT

AH CRAP. Miss-read your question. Here is the correction (to pick a group in the active ARIS-Database):

create the button as described above.

then the button-reaction method should be:

this.PB1_pressed = function(){
        var activeDB = ArisData.getActiveDatabase();
        
        result = this.dialog.setBrowseArisItems("BF1", "Pick Group", "Pick a group", activeDB.ServerName(), activeDB.Name(Context.getSelectedLanguage()),Constants.CID_GROUP,[]);

    }

and the catcher method should be:

this.BF1_subDialogClosed = function(subResult, bOK){
        var foundGroup = ArisData.getActiveDatabase().FindOID(subResult);
        
        if(foundGroup.KindNum() == Constants.CID_GROUP) {
                //The foundGroup object is an object of the class Group (report). Feel free to do with it whatever you want
        }
    }

 

0
by Alokin Iksok Author
Posted on Tue, 06/19/2018 - 15:39

Thanks Kay,

I think this is it.

Additional question, in the same dialog box I have to list all the models and objects in the database(preferably to be shown as a tree with parent groups and children) and next to each item(model or object) to be checkbox for the user to select that object or model.

Do you have some suggestion?

Thanks again.

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