문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top