Hi All ,
Iam trying to search specific models from Groups using below code and the Models iam looking for the models name have the suffix '_NGU' . I would like to fetch these models from group called : B. Processes .
Groups which i had A, B ,C and D in my database , Need to fetch these specific models from all groups .
var oCurrentDatabase=ArisData.getActiveDatabase();
var aModels=new Array();
var arrSelectedGroups = ArisData.getSelectedGroups();
var searchItem2=oCurrentDatabase.SearchModels("B. Processes","*NGU",Constants.SEARCH_OPTION_MATCH_PATTERN);
When iam executing this code , iam getting syntax error Cannot find SearchModels function .
iam struggling to find solution for this ,Can any one help me on this Please .......................
Thanks in Advance .
Rams.
Brooke Baker on
Hi,
You could try
var aModels=new Array(); var oCurrentDatabase = ArisData.getActiveDatabase(); var searchResults = oCurrentDatabase.Find(Constants.SEARCH_MODEL, null, Constants.AT_NAME, 1033, "*NGU", Constants.SEARCH_CMP_WILDCARDS); for(var i=0; i<searchResults.length(); i++){ if(searchResults[i].Group().Name(1033)=="B. Processes") aModels.push(searchResults[i]); }**Note - I havent tested this - just a suggestion.