TD
Hi I try to build an Report for ARIS exporting XML I want the content to be sorted by the groupname:
function getSelection() { selection = ArisData.getSelectedDatabases(); if (selection.length > 0) selection = [selection[0].RootGroup()]; // Database selected -> return main group if (selection.length == 0) selection = ArisData.getSelectedGroups(); if (selection.length == 0) selection = ArisData.getSelectedModels(); if (selection.length == 0) selection = ArisData.getSelectedObjDefs(); selection = ArisData.sort(selection, SORT_GROUPNAME, loc); return selection; }
When I start the report I get an RefferenceError SORT_GROUPNAME is not defined. Does anybody get the Same problem, the ARIS Help says SORT_GROUPNAME is a "normal" criteria.
Regards
Tobias
Hi Tobias,
if you correct your script, if will run without any error.
BR, Torsten
var loc = Context.getSelectedLanguage() var x = getSelection() function getSelection() { var selection = ArisData.getSelectedDatabases(); if (selection.length > 0) selection = [selection[0].RootGroup()]; // Database selected -> return main group if (selection.length == 0) selection = ArisData.getSelectedGroups(); if (selection.length == 0) selection = ArisData.getSelectedModels(); if (selection.length == 0) selection = ArisData.getSelectedObjDefs(); selection = ArisData.sort(selection, Constants.SORT_GROUPNAME, loc); return selection; }