Cascading Lookup

How can you filter by two different items with Cascading Look up
One item is static and one is dynamic
I attempted the following

fd.spRendered(function() {
    function filterLookup(v){
        // getting the selected Category (0 if nothing is selected).
        var categoryId = 0;
		var task="Doorlist";
        if (v) {
        categoryId = isNaN(v) ? v.LookupId : v;
        }

        if (categoryId) {
            // setting filtration
			 fd.field('Doors').filter = 'Task eq ' + task + 'and Site/Id eq ' + categoryId;
          ;
        } else {
            // resetting the filtration
            fd.field('Doors').filter = null;
        }

        fd.field('Doors').widget.dataSource.read();
    }

    //filter Products when form opens
    filterLookup(fd.field('Site').value);

    //filter Products when Category changes
    fd.field('Site').$on('change', function(value){
        filterLookup(value);
        fd.field('Doors').value = null;
    });
});

Dear Jennifer,
Should be more or less fine, assuming it works correctly with what fields you have. One slight error I do notice however is with:
var task="Doorlist";

I recommend changing it to this instead:
var task="'Doorlist'";

It must have quotes inside of a string, since you filter by a string (I assume).