Recently a new 'Cancel' button was added to the setup screen, allowing users to cancel a blend setup midway through. In this article, we'll describe the default behavior of this button, and what you can do to change this.
The cancel button appears on the bottom right of any setup screen and allows users to cleanly exit the setup flow.
![image2021-5-25_17-9-6.png image2021-5-25_17-9-6.png](https://community.qlik.com/t5/image/serverpage/image-id/55716i8E02AD6A59851CC6/image-size/large?v=v2&px=999)
Default Behavior
The default behaviour of this button is to end the setup flow, and redirect the user to the blend detail page inside the iframe. This means that if the setup flow is "canceled", it simply navigates the user away from it. It doesn't delete any blend instances or datasources that were already created for instance. If the user clicks the setup button on the blend detail page they will just continue the setup flow as before.
![image2021-5-25_17-31-23.png image2021-5-25_17-31-23.png](https://community.qlik.com/t5/image/serverpage/image-id/55717iD77DEB654CAFE7B6/image-size/large?v=v2&px=999)
Customizing the cancel behavior
If we want to tailor the user experience, we can take advantage of an available javascript event (setup-canceled). When the user clicks this Cancel button, the setup-canceled event will be emitted, but ONLY if we explicitly ask for it in the JWT. We can do so by adding the embed parameter to the JWT (javascript example below). Please note that we are choosing the "event mode" in this example.
![image2021-5-25_17-27-40.png image2021-5-25_17-27-40.png](https://community.qlik.com/t5/image/serverpage/image-id/55718i051CF779B0B3BBCC/image-size/large?v=v2&px=999)
If you add this code to your JWT, you'll notice that this cancel button no longer has any logic of its own. It simply emits the javascript event "setup-canceled" (note the single l), and otherwise just hangs on the same page. As part of the implementation, it's expected that we listen to the javascript event being emitted (javascript example below), and write some logic that decides what to do next.
![LauraLangenaken_1-1622020816295.png LauraLangenaken_1-1622020816295.png](https://community.qlik.com/t5/image/serverpage/image-id/55722iCD61C883571D5791/image-size/large?v=v2&px=999)
The implementation of this is entirely up to you. Some customers may want to delete redundant blend instances if the setup flow wasn't completed, while others may want to remove datasource credentials if they aren't being used.
The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.