Using your Sharepoint Lookup example, I was trying to filter out blank values in a dropdown (a lookup to a calculated column, native SharePoint forms automatically exclude blanks). Client is the column name, but this didn’t work:
function filterDT(){
dt.filter = "<IsNotNull><FieldRef Name='Client' /></IsNotNull>";
}
Also, I couldn’t find any documentation on Sort. Is it not possible to sort a dropdown by the values?
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.
Thank You! That helped me find the problem – my filter was on a calculated lookup column, Sharepoint wasn’t happy about that. Console showed the error: “The field ‘Client’ of type ‘Calculated’ cannot be used in the query filter expression.” I added the extra lookup fields and recreated that calculated column using filters, works fine now.
is the LookupFieldInternalName same as the Name of the dropdown list? and what should i put in the "Extra Fields" field. Please refer to the below image on details of my dropdown list.