Paging queries - SmartPlant Foundation - IM Update 44 - Customization & Programming - Hexagon

SmartPlant Foundation Customization

Language
English
Product
SmartPlant Foundation
Search by Category
Customization & Programming
SmartPlant Foundation / SDx Version
10

The DAL query engine allows you to return your results in a page. This is implemented through the Skip and Top Properties on the Query object.

Example 1 returns the first page with a page size set to 2 items:

lobjDynamicQuery.Query = ObjectCriteria(Function(o) o.HasInterface("IDEVTag"))

lobjDynamicQuery.Query.Skip = 0

lobjDynamicQuery.Query.Top = 2

Example 2 returns the second page with the page size set to 2 items:

lobjDynamicQuery.Query = ObjectCriteria(Function(o) o.HasInterface("IDEVTag"))

lobjDynamicQuery.Query.Skip = 2

lobjDynamicQuery.Query.Top = 2

Skip = (PageNumber - 1) * PageSize