Profile picture for user maikoliv

Hi there,

I've some trouble with the return value of the  Aris method BrowseArisItems.

It is supposed to return

"selected items as a string containing the IDs (GUID, OID or string) of the selected items, separated by ";".

So I expect a String containing a GUID by choosing one VAC from the dialog created by this method. But the return value is not the GUID, it is not even a String.

I can handle the String conversion, but I'd like to know which value is returned by the method.

Has anyone experienced similar behaviour? Could it be a problem regarding the encoding?

Regards,

Maik

by Freddy Barkhuizen
Posted on Thu, 03/31/2011 - 23:27

Hi Maik, 

It looks like that method returns a string containing Object IDs seperated by ";"

Have a look at the following code:

var nLanguage = Context.getSelectedLanguage();
var aDatabase = ArisData.getActiveDatabase();
var sServerName = aDatabase.ServerName();

var sStr = Dialogs.BrowseArisItems("Select Model","Select one or more Models",sServerName,aDatabase.Name(nLanguage),Constants.CID_MODEL);

Dialogs.MsgBox(sStr);        

if (sStr == ""){
     Dialogs.MsgBox("Please select one or more Models");
}else{
    
    var arr = sStr.split(";");
    
    Dialogs.MsgBox(arr.length + " Models selected");
    
    for(var i=0; i<arr.length; i++) {
        var oModel = aDatabase.FindOID(arr[i]); 
        
        if (oModel.KindNum()==Constants.CID_MODEL) 
            Dialogs.MsgBox(oModel.Name(nLanguage) + "(" + oModel.Type() + ")"); 
    }

}

Hope this helps.

0
by Maik Scharlau Author
Posted on Wed, 04/06/2011 - 14:12

That's it. Thanks a lot.

Regards,

Maik

0
by Francois Du Toit
Posted on Tue, 08/13/2013 - 07:37

Hi Guys,

The command works for models, but not for filters, I just get a blank selection screen...

This happens even if I use the command without the DB specified. Please test it and let me know:

CID_METHODFILTER

var nLanguage = Context.getSelectedLanguage(); 
var aDatabase = ArisData.getActiveDatabase(); 
var sServerName = aDatabase.ServerName(); 
  
var sStr = Dialogs.BrowseArisItems("Select Model","Select one or more Models",sServerName,aDatabase.Name(nLanguage),Constants.CID_METHODFILTER); 
  
Dialogs.MsgBox(sStr);         
  
if (sStr == ""){ 
     Dialogs.MsgBox("Please select one or more Models"); 
}else{ 
      
    var arr = sStr.split(";"); 
      
    Dialogs.MsgBox(arr.length + " Models selected"); 
      
    for(var i=0; i<arr.length; i++) { 
        var oModel = aDatabase.FindOID(arr[i]);  
          
        if (oModel.KindNum()==Constants.CID_MODEL)  
            Dialogs.MsgBox(oModel.Name(nLanguage) + "(" + oModel.Type() + ")");  
    } 
  
} 

 

Please advise, thx.

Francois

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