The all
keyword is used to access all entities in nested entities.<br><br>
E.g., you have the entities [Shop]
and [Shop.Product]
(where [Shop.Product]
is the nested entity).<br>
When you use count([Shop.Product])
, then you’ll get number of products of the current shop. If instead you want to count all products of all shops, you can write:<br>
count(all [Shop.Product])
Syntax
all[entity]
Where entity
is a nested entity)
Returns
All entities of a given nested entity
Examples
first(all[Shop.Product] where [Shop.Product.ProductCode] = "X-00014-1297")
/* searches all products in all shops and returns the first product that has a specified product code */
[Shop] where RowId([Shop]) in {
RowId([Shop]) of all[Shop.Product] where [Shop.Product.Price] >= 20 and [Shop.Product.Price] <= 30
}
/* returns all shops that have a product in the price range between 20 and 30*/