Filter blanks from dropdown?

Hi!

As far as I understand, you want to exclude the blank values from a dropdown field and sort the values inside a dropdown, am I right?

You can use a lookup filter for this case:

Use 'ne' (not equal) in the filter query to exclude empty elements.

A code will look like this:

fd.spRendered(function() {
   fd.field('LookupFieldInternalName').filter = "FilterFieldName ne null";
   fd.field('LookupFieldInternalName').orderBy = "OrderFieldName";
   fd.field('LookupFieldInternalName').widget.dataSource.read();	
});

Make sure to add the fields that you want to use for filtering and ordering as an Extra fields in Lookup properties, if it’s not the field that Lookup displays by default.