Hello Community !!
I would like to search models regarding :
1. The name and the Type Number of a model
- var searchItem1 = db.createSearchItem(Constants.AT_NAME, nloc, "L0*", Constants.SEARCH_CMP_EQUAL, false, true);
- var searchModelType = new Array();
searchModelType[0] = 176836;
2. I would like to filter the response with models in a spécific Group and alls the subgroups
Should I use a second SearchItem ?
Or may I get all the answers and test the group afterward ?
Thank you in advance for your advice !!
Christian
Hi Christian,
your search is exactly described in the online help. Please check following method:
Group#ModelList ( boolean bRecursive, int[] typeNums, SearchItem p_searchSpec )
And here the example from help:
var currentDB = ArisData.getActiveDatabase()
var currentLocale = Context.getSelectedLanguage()
var searchItem = currentDB.createSearchItem(Constants.AT_NAME, currentLocale, "A*", Constants.SEARCH_CMP_EQUAL, false, true) //non-case-sensitive + search using wildcards
var models = currentGroup.ModelList(true, [Constants.MT_EEPC, Constants.MT_ORG_CHRT], searchItem )
BR, Michael