Pregunta

I am trying to make a filter with REST, the code executes only the first part of the filter, here's my query:

http://site/_api/web/lists/getByTitle('Data')/items?$orderby Created desc&$filter=(Category eq 'Students') and (Registered ne null)

However, it's getting all Students, whether registered or not. any help is appreciated.

Registered column is single line of text.

¿Fue útil?

Solución

I don't think you can do it by checking null values, you can do it by getting items where the column is gt 0, so your query would be like:

http://site/_api/web/lists/getByTitle('Data')/items?$orderby Created desc&$filter=(Category eq 'Students') and (Registered gt 0)

This will check the length of the string added to the column, in this case > 0 would mean ne null.

Licenciado bajo: CC-BY-SA con atribución
scroll top