I am attempting to add details to a lookup but also filter it.
The adding of the Number works however the filtering does not.
Below is my Code
fd.spRendered(function() {
function filterLookup(v){
// getting the selected Choice (0 if nothing is selected).
var choice = v;
// setting filtration
fd.field('Positions').filter = "HRStatus eq 'Open/Active'";
}
//filter when form opens
filterLookup(fd.field('Positions').value);
//filter when Choice changes
fd.field('Positions').$on('change', function(value){
filterLookup(value);
});
var template = '';
template += '<span сlass="lookup-col">';
template += '<p сlass="lookup-title"> #: data.LookupValue # </p>';
template += '<p class="lookup-desc">#: data.Id ? " " + data.Id : "" #</p>';
fd.field('Positions').widgetOptions = {
template: template,
height: 400,
virtual: {
itemHeight: 100
}
}
// Calling hideOrShowDueDate when the user changes the Start Date
fd.field('Status').$on('change',hideOrShowDueDate);
// Calling hideOrShowDueDate on form loading
hideOrShowDueDate();
});