redirect to another page within an action?

redirect to another page within an action?

  
If I am making an action that I want to use in multiple pages, can I put a screen redirect within it?  For example within an action say if a condition is true, send the user to a page.
Hi Jason,

A redirect is something that must occur in the context of a screen therefore you can only do it in a screen action and its not possible to redirect from an user action as those could be used in other contexts (like webservices, timers and so on).

Cheers,
Guilherme
Hi Jason,
What you can do is to create an output parameter on that User Action which indicates wether or not you want to redirect, instead of doing the redirect from inside the User Action (which is not possible).
You will have to put the redirect whenever you use that action on your screens, based on the output parameter of the User Action.
Hi Jason,
I think Tiago and Guilherme's explanations are the best approach. Just to complete, after the user action you can use a "If" or  a "Switch", if you want more then 2 choices, that can handle the output value from the user action and set the flow you want.
Hello, I faced a sence that I wanna redirect within an action of OnBeginWebRequest.
I will implement a setup function for my application. And when user access any resource of my application first time, the page will be redirected to the setup screen.
I am try to done this by using OnBeginWebRequest, but I found that I can not redirect within OnBeginWebRequest.
Is thre anyway to do this?



I believe the best approach would be to raise an exception inside your action, and put an exception handler on the Common web flow.
Exception handlers inside web flows can be used for redirecting a user upon an exception.