MobileServiceTable.take function

Returns the specified number of rows in the query.

mobileServiceTable.take(count);

Parameters

  • count
    Type: number

    The number of rows in the query to return.

Return Value

Type: Query object

A query that can be further composed.

Example

This code defines a filtered query that returns the top 3 items, and then binds the results to a control.

todoTable.where({ complete: false })
    .take(3)
    .read()
    .done(function (results) {
        todoItems = new WinJS.Binding.List(results);
        listItems.winControl.itemDataSource = todoItems.dataSource;
    });

.NET Framework Equivalent

Take

Requirements

Namespace

WindowsAzure.MobileServices

Library

MobileServices.js

See Also

Reference

MobileServiceTable object

Other Resources

How to use an HTML/JavaScript client for Azure Mobile Services
Refine Mobile Services queries with paging