Logo

    Home

    Documentation

    Use Cases

    Training

    Applications

    Release Notes

    Initial Fetch

    icon

    Initial Fetch attribute in DataSourceDataSource

    The Object Type DataSource also has an attribute called “Initial Fetch”, however the behaviour of that attribute is different and it only allows the value “#none” that forces the datasource to not load any data and wait for client logic to fetch it. (This option is not available in the “Initial Fetch” attribute of Swat Selects)

    The Value of this Attribute will be sent to the backend as a query for the DataSourceDataSource that the Select (DynSelect)Select (DynSelect) is using. There are possible options that can be used as a query.

    • <Empty>
    • If the value of the attribute is not set, no query will be sent to the backend and the Datasource will load the results normally

    • initFetch:All
    • This query is a special option that will load up to 1000 records from the DataSource (the default without this is 50) and will ignore any possible filter that was added (Filters that could have been added trough client logic or other methods)

    • <Search Parameter>
    • If anything else is written in the value of this attribute the backend will use that value as a search parameter filter for the datasource in its initial fetch of the data. However it is important to remember that if the user starts typing any other value in the search box of the Select, that value will be used instead to filter the DataSource

      icon

      The combination of the attributes “Initial Value” and “Preset Value in Search” are recommended to achieve an initial filtering of the Datasource for the user. As those ones will display the search parameter in the Field and the user can understand what filtering is being done. “Initial Fetch” should only be used when that generic behaviour is not fulfilling the needs and some special handling is needed.

    Logo