The Clear Records action is used to remove records from a specified data source within your application. This action can be configured automatically or manually, depending on the specific needs of your workflow.
Clear a selection made by a user such as a shopping cart or collection.
Automatic
Automatically detects the data source used within the context of the component where the action is added. This includes data sources utilized by repeaters or normal components.
Usage: Ideal for scenarios where the data source is dynamically linked to the component, ensuring the correct records are cleared without manual intervention.
Add Action: Navigate to the component where you want to add the Clear Records action.
Select Clear Records: From the Actions menu, choose the "Clear Records" option.
Automatic Detection: The system will automatically configure the action to remove records from the current query used by the component.
Customized
Allows you to manually select the data source from which you want to clear records.
Usage: Useful when you need precise control over which data source to target, regardless of the component context.
Add Action: Navigate to the component where you want to add the Clear Records action.
Select Clear Records: From the Actions menu, choose the "Clear Records" option.
Choose Data Source:
Click on the data source selection box.
Select the desired data source from the list.
Example
Adding Clear Records on Click Event
Navigate to Component: Go to the component where you want to add the Clear Records action.
Add On Click Event:
In the component settings, locate the "On Click" section.
Click the "+" button to add a new action.
Select Clear Records:
Choose "Clear Records" from the list of available actions.
Configure the Action:
If using automatic configuration, ensure it is correctly set.
If using custom configuration, select the appropriate data source.