2 Replies Latest reply: Oct 10, 2013 12:01 PM by AGM RSS

    Handling domain's value list returned by getValueList() - ConstraintEnumeration


      I would like to create a script in order to extract, for each column that make use a domain, a list like this format:

      tableName | columnName | domainValue | domainValueDescription


      But the problem is that domain.getValueList(), according with the documentation, returns a ConstraintEnumeration type and may be a silly question, but I don't know how to iterate this object to get the values and descriptions.

      This is the script example:

      var tables = model.getTableSet().toArray();

      for(var t=0; t < tables.length; t++){

          var table = tables[t];

          var columns = table.getElements();

          for(var c=0; c < columns.length; c++){

              var column = columns[c];

              if(column.getUse() == 0 && column.getDomain()!= null){

                  var domain = column.getDomain();

                  var valueList = domain.getValueList();

                  // how to iterate valueList?




      I looked at the documentation but this class is not documented so I don't know the available methods and had no luck trying to discover them with the debugger.


      I appreciate  any help.