How can i pop a view in a different tab?


I am building an app where a user can input an API url and get data accordingly. If the user is in a detail view in a different tab and the API url is changed, the user remains in a detail view that is no longer available. Does anybody have an idea as to how i move the user back a page in a different tab? I already tried this: