lib/Models/SdmxJsonCatalogItem.js
function canTotalBeCalculatedAndIfNotWarnUser(item) {
  if (canResultsBeSummed(item)) {
    return true;
  }
  var conceptItems = item._concepts[0].items;
  var changedActive = [];
  conceptItems.forEach(concept => {
    var numberActive = concept.items.filter(function(subconcept) {
      return subconcept.isActive;
    }).length;
    if (numberActive > 1) {
      changedActive.push('"' + concept.name + '"');
    }
  });
  if (changedActive.length > 0) {
    item.terria.error.raiseEvent(
      new TerriaError({
        sender: item,
        title: "Cannot calculate a total",
        message:
          "You have selected multiple values for " +
          changedActive.join(" and ") +
          ", but the measure you now have chosen cannot be totalled across them. \
            As a result, there is no obvious measure to use to shade the regions (although you can still choose a region to view its data).\
            To see the regions shaded again, please select only one value for " +
          changedActive.join(" and ") +
          ", or select a different measure."
      })
    );
    return false;
  }
  return true;
}
function canTotalBeCalculatedAndIfNotWarnUser(item) {
  if (canResultsBeSummed(item)) {
    return true;
  }
  var conceptItems = item._concepts[0].items;
  var changedActive = [];
  conceptItems.forEach(concept => {
    var numberActive = concept.items.filter(function(subconcept) {
      return subconcept.isActive;
    }).length;
    if (numberActive > 1) {
      changedActive.push('"' + concept.name + '"');
    }
  });
  if (changedActive.length > 0) {
    item.terria.error.raiseEvent(
      new TerriaError({
        sender: item,
        title: "Cannot calculate a total",
        message:
          "You have selected multiple values for " +
          changedActive.join(" and ") +
          ", but the measure you now have chosen cannot be totalled across them. \
            As a result, there is no obvious measure to use to shade the regions (although you can still choose a region to view its data).\
            To see the regions shaded again, please select only one value for " +
          changedActive.join(" and ") +
          ", or select a different measure."
      })
    );
    return false;
  }
  return true;
}
function canTotalBeCalculatedAndIfNotWarnUser ( item ) { if ( canResultsBeSummed ( item ) ) { return true ; } var conceptItems = item . _concepts [ 0 ] . items ; var changedActive = [ ] ; conceptItems . forEach ( concept => { var numberActive = concept . items . filter ( function ( subconcept ) { return subconcept . isActive ; } ) . length ; if ( numberActive > 1 ) { changedActive . push ( '"' + concept . name + '"' ) ; } } ) ; if ( changedActive . length > 0 ) { item . terria . error . raiseEvent ( new TerriaError ( { sender : item , title : "Cannot calculate a total" , message : "You have selected multiple values for " + changedActive . join ( " and " ) + ", but the measure you now have chosen cannot be totalled across them. \
            As a result, there is no obvious measure to use to shade the regions (although you can still choose a region to view its data).\
            To see the regions shaded again, please select only one value for " + changedActive . join ( " and " ) + ", or select a different measure." } ) ) ; return false ; } return true ; }
Only show a warning if more than one value of a concept has been selected. Returns true if the user has been warned.
Only show a warning if more than one value of a concept has been selected . Returns true if the user has been warned .