Skip to main content

Event Action to Clear Browser Session Data

In this video you will understand how to clear session values via events. There could be several scenarios where you want to delete or remove all or specific data that is stored in the browser session (as part of any REST API response or Form Submit). Here you can know how to clear that data via events.

1. Create an Event to Clear Browser Session

Create an event to clear the browser session and it will indicate what exactly has to be done. Here choose the option Show Confirmation Message. This event will be triggered when the browser session data gets cleared.

DrapCode Builder Dependent Dropdown Event

1.1 Fill the Form

Next add the event to Clear the Browser Session Data. This will display a form. Select to clear all response data and all form data. Mention the data key too from the details in the Inspect window. Click the Save option.

DrapCode Builder Dependent Dropdown Event

2. Create an Event to Clear Selected Keys

Create an event to clear the browser session's slected keys and it will indicate what exactly has to be done. Here choose the option Clear the Browser Session Data. This will display a form. Select the response keys to clear from the session. Click the Save option. The details of the response keys you can find in the Inspect element window.

DrapCode Builder Dependent Dropdown Event

3. Bind Event to the Form

You can bind the event to the collection. For this go to the Settings icon and the respective event to bind respectively to the chosen collection from the dropdown. Then save your settings.

DrapCode Builder Dependent Dropdown Event

4. Bind the Event to the Button

You can bind the event to the button. For this go to the Settings icon and the respective events to bind respectively to the their buttons. Then save your settings.

DrapCode Builder Dependent Dropdown Event

5. Implement the Event to Clear Browser Session

Go to the display page and Reload it. The records will be shown here. However, once you click the clear browser session data and Submit the respective event will trigger. Before doing so it will promptly confirm if this is what you wish to do. On confirming it the event will proceed.

DrapCode Builder Dependent Dropdown Event