Domanda

Sto cercando di interrogare una lista in cui il titolo inizia con una lettera nella gamma da A a M e non riesco a trovarlo ovunque nella documentazione sparsa disponibile.

L'ho provato, ma non è valido e sono abbastanza sicuro che finirei prima il limite del personaggio consentito in un URL comunque.

/humanresources/_api/web/lists/GetByTitle('Corporate Directory')/items?$filter=( startswith(Title, 'a') Or startswith(Title, 'b')  )&?orderby=Title asc
.

Qualsiasi aiuto è apprezzato.

Grazie in anticipo!

È stato utile?

Soluzione

Try this:

$filter=title ge 'a' and title lt 'n'

Altri suggerimenti

In your example there is a typo in Filter expression:

$filter=( startswith(Title, 'a') Or startswith(Title, 'b')  )

The name of logical operator is or (lowercase letters in name!) , please refer Supported OData Query Options for a more details.

Below is provided a valid query:

/humanresources/_api/web/lists/getbytitle('Corporate Directory')/items?$filter=startswith(Title, 'a') or startswith(Title, 'b')&?orderby=Title asc
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top