<option i18n value="__gte" [hidden]="searchTermDatatypes[t.field] != 'timestamp' && !dateLikeSearchFields[t.field]">is on or AFTER</option>
<option i18n value="__between" [hidden]="searchTermDatatypes[t.field] != 'timestamp'">is BETWEEN</option>
<option i18n value="__age" [hidden]="searchTermDatatypes[t.field] != 'timestamp'">age (relative date)</option>
+ <option i18n value="__isnotnull">exists</option>
+ <option i18n value="__isnull">does NOT exist</option>
<option i18n value="__in">matches a term from a file</option>
</select>
</div>
<div class="col-lg-3">
- <ng-container *ngIf="t.op == '__in'">
- <eg-file-reader [(ngModel)]="t.value1" [ngModelOptions]="{standalone: true}"></eg-file-reader>
+ <ng-container *ngIf="t.op == '__in' || t.op == '__isnull' || t.op == '__isnotnull'">
+ <ng-container *ngIf="t.op == '__in'">
+ <eg-file-reader [(ngModel)]="t.value1" [ngModelOptions]="{standalone: true}"></eg-file-reader>
+ </ng-container>
</ng-container>
- <ng-container *ngIf="t.op !== '__in'">
+ <ng-container *ngIf="t.op !== '__in' && t.op !== '__isnull' && t.op !== '__isnotnull'">
<div *ngIf="t.field.endsWith(':state') && (t.op === '' || t.op === '__not'); else notStateField">
<eg-combobox *ngIf="t.op != '__fuzzy'"
[asyncSupportsEmptyTermClick]="true"
// handle supplied search terms
this._terms.forEach(term => {
- if (term.value1 === '') {
+ if (term.value1 === '' && !(term.op === '__isnull' || term.op === '__isnotnull')) {
return;
}
const searchTerm: Object = {};
const recType = term.field.split(':')[0];
const searchField = term.field.split(':')[1];
- if (term.op === '__between') {
+ if (term.op === '__isnull') {
+ searchTerm[searchField] = null;
+ } else if (term.op === '__isnotnull') {
+ searchTerm[searchField] = { '!=' : null };
+ } else if (term.op === '__between') {
searchTerm[searchField] = [term.value1, term.value2];
} else {
searchTerm[searchField] = term.value1;