Skip to main content

Conditional Redirect

Intro

Conditional redirection is based on the chosen Data Location's Collection Item Value Field to enhance user experience. This dynamic feature directs users to different pages or sections depending on specific data conditions, optimizing navigation based on their input or selection.

In this video tutorial you will understand how to conditionally redirect based on the chosen Data Location's Collection Item Value Field Value.

1. Drop a Data Table

Go to Pages. Right click on its Settings and choose the collection to bind.

DrapCode Builder Collection Constructor

1.1 Open Data Table Settings

Open the Data Group Settings and choose the collection, field and filter and Save.

DrapCode Builder Collection Constructor

2. Create Redirect Event

Create an event to redirect to another page using current row's item ID and collection that is bind with the parent Data Group/Table/List component.

Go to Events and Add Event. Name the event and Create.

Then configure the event by choosing Save Data and Edit.

DrapCode Builder Collection Constructor

1.1 Add Event Details

Add the collection and the notification messages.

DrapCode Builder Collection Constructor

1.2 Apply Conditional Redirect

Choose Conditional Redirect and Edit.

DrapCode Builder Collection Constructor

1.3 Add Event Details

Add the data location, collection and field followed by field value, page, choose Target, path field and collection form.

DrapCode Builder Collection Constructor

3. Bind the Event to the Data Group

Open the Data Group Settings and choose the collection and event to bind and then Save.

DrapCode Builder Collection Constructor

5. Test the Changes

Go to Preview and add a new record and Submit.

DrapCode Builder Collection Constructor

6. First Redirect Action

To redirect to another page using current page's details page, item ID and collection bind to the page.

Go back to the event created previously and in Conditional Redirect update the field value and path field.

DrapCode Builder Collection Constructor

7. Test the Changes

Go to Preview and add a new record and Submit.

DrapCode Builder Collection Constructor

8. Second Redirect Action

To redirect to anotehr page using newly created or updated item ID using the collection form and collection bind with the Collection Form component.

Go back to the event created previously and in Conditional Redirect update the field value, path field and add Collection Form.

DrapCode Builder Collection Constructor

9. Test the Changes

Go to Preview and add a new record and Submit.

DrapCode Builder Collection Constructor

Conclusion

One notable benefit of conditional redirection in a web application, based on the chosen Data Location's Collection Item Value Field, is the enhanced user experience through personalized and context-specific navigation.