Queries, also known as filters, are strings that are appended in the request as query parameters. Sitefinity JS SDK allows you to build queries programmatically.
Queries can be built with functions such as skip(), take(), count(), order(), select(), and where().
skip()
take()
count()
order()
select()
where()
NOTE: All queries that use the where() clause are implicitly followed by an and() operand. For example the query query.where().and().endswith("Title", "Record").done().done() produces the string (endswith(Title, 'Record')), which has a set of unused parenthesis - the outermost ones.
and()
query.where().and().endswith("Title", "Record").done().done()
(endswith(Title, 'Record'))
This article uses as example a query that returns items whose title ends with Record AND the age of the item is not equal to 15 OR the content equals test.
You build and use this query in the following way:
Query()
Sitefinity
Query
endwith
or
ne
eq
The .done() functions are used to specify where the operation ends. It is required so that the filter can be closed. Each time you use an and() or an or() operand you must add a done().
.done()
or()
done()
build()
GET
Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.
This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.
This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.
The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important