Retargeting is a special form of navigation which involves navigating to an entirely different project. Retargeting is accomplished through scripting, usually as a response to a button press or other component event. The system.util.retarget() function allows you to 'retarget' the Client to a different project. You can have it switch to another project on the same Gateway, or another Gateway entirely, even across a WAN. This feature makes the vision of a seamless, enterprise-wide SCADA application a reality.
The retarget feature will attempt to transfer the current user credentials over to the new project / Gateway. If the credentials fail on that project, the user will be prompted for a valid username and password. Once valid authentication has been achieved, the current project is shut down and the new project is loaded.
You can pass any information to the other project through the parameters dictionary. All entries in this dictionary will be set in the global scripting namespace in the other project. Even if you don't specify any parameters, the system will set the variable _RETARGET_FROM_PROJECT to the name of the current project and _RETARGET_FROM_Gateway to the address of the current Gateway.
Retargeting can be as simple as a single line of code, just make sure you are using the project name (no spaces allowed), and not the title. See the retarget function in the appendix for more information.
A typical retargeting strategy actually combines this strategy with one or more other navigation strategies. A simple landing project could be made so that all users would have access to perform basic user management functions, and then use a screen with Button components that retarget approved users out to other projects targeting a specific area of operations. The buttons that retarget to these projects can be hidden or shown based on the user, allowing you to build in an extra layer of security to your projects. Additionally, each of the other projects would utilize navigation strategies that best suit those areas.