Table of Contents

Retrieving

This rule is triggered before (re)loading data (GET API call). This occurs when :

  • the UI view is opened and its Load data on start property is true
  • the user clicks on a Refresh button
  • calling the load methods (LoadDataAsync, LoadMoreDataAsync, ReloadDataAsync, ...)
Note

The rule is cancelable, this prevents the execution of the GET API call.

A common use case is when you want to prevent the API call if the filter input is not correct.

Note

In most cases, this rule should be set on server side at the entity view level.
A good reason to set this rule on client side rule is to avoid making an unnecessary API call.

See this article for more information on event rules execution order.

Arguments

The Arguments property provides the following options.

Name Type Description
Cancel bool If set to true, the API will not be called.

Item versus DatasourceCurrent

This rule is not tied to a particular item so it does not offer an Item property.

Note

In a Retrieving event rule, DatasourceCurrent is always null during the first retrieval, except when the data of the UI view is shared from another UI view.

To know more on the difference between the Item and DatasourceCurrent properties in an UI view event rule, you can check this article.