diff --git a/planetstack/core/xoslib/static/js/xoslib/xosHelper.js b/planetstack/core/xoslib/static/js/xoslib/xosHelper.js
index ece2419..1141dcb 100644
--- a/planetstack/core/xoslib/static/js/xoslib/xosHelper.js
+++ b/planetstack/core/xoslib/static/js/xoslib/xosHelper.js
@@ -595,6 +595,34 @@
                                                     model: this.model,
                                          }},
 
+             applyConstraints: function() {
+                 for (constraint in this.model.constraints) {
+                     // constraint syntax: "operator,destField.destSubField,srcField.srcSubField"
+                     //   i.e. equal,node.deployment,deploymentNetwork.id
+                     parts = constraints.split(",");
+                     operator = parts[0];
+                     parts1 = parts[1].split(".");
+                     destField = parts1[0];
+                     destSubField = parts1[1];
+                     parts2 = parts[2].split(".");
+                     srcField = parts2[0];
+                     srcID = this.$el.find(srcModel).val();
+                     if (operator == "equal"):
+                         filterMaker = function makeFilter(destSubField,srcID) { return function(linkedObj) { return (linkedObj.attributes[destSubField] == srcID); } };
+                         filterFunc = filterMaker(destSubField, srcID);
+                     else:
+                         continue;
+
+                     newSelect = idToSelect(destField,
+                                            model.attributes[destField],
+                                            model.foreignFields[destField],
+                                            "humanReadableName",
+                                            false,
+                                            filterFunc);
+
+                     this.$el.find(destFieldName).html(newSelect);
+                 },
+
 });
 
 /* XOSItemView
@@ -920,7 +948,7 @@
    fieldName = name of field within models of collection that will be displayed
 */
 
-idToOptions = function(selectedId, collectionName, fieldName) {
+idToOptions = function(selectedId, collectionName, fieldName, filterFunc) {
     result=""
     for (index in xos[collectionName].models) {
         linkedObject = xos[collectionName].models[index];
@@ -931,6 +959,9 @@
         } else {
             selected = "";
         }
+        if ((filterFunc) && (!filterFunc(linkedObject)) {
+            continue;
+        }
         result = result + '<option value="' + linkedId + '"' + selected + '>' + linkedName + '</option>';
     }
     return result;
@@ -944,14 +975,14 @@
    fieldName = name of field within models of collection that will be displayed
 */
 
-idToSelect = function(variable, selectedId, collectionName, fieldName, readOnly) {
+idToSelect = function(variable, selectedId, collectionName, fieldName, readOnly. filterFunc) {
     if (readOnly) {
         readOnly = " readonly";
     } else {
         readOnly = "";
     }
     result = '<select name="' + variable + '"' + readOnly + '>' +
-             idToOptions(selectedId, collectionName, fieldName) +
+             idToOptions(selectedId, collectionName, fieldName, filterFunc) +
              '</select>';
     return result;
 }
