--- title: "system.perspective.navigate" description: "Navigates a Session to a specified view or mounted page." --- # system.perspective.navigate > Navigates a Session to a specified view or mounted page. This function is used in **Python Scripting**. ## Description The function can be used in three different ways, depending on which parameter is specified: * `page`: Navigates to a Perspective page. * `url`: Navigates to a web address, so the function can be used to navigate the user to a web portal, search engine, or other website. This parameter is specified via keyword argument. * `view`: Navigates to a view. Note that using this parameter does not modify the web browser's address bar, so the browser's history will not contain a listing for the new view. This parameter is specified via keyword argument. :::note This function supports most common protocols, so it can be used to perform tasks like initiating a call (tel:), text (sms:), or email (mailto:) from Perspective. ::: ## Syntax :::tip This function accepts [keyword arguments](platform\scripting\python-scripting\user-defined-functions.md#keyword-arguments). ::: `system.perspective.navigate(page, url, view, [params], [sessionId], [pageId], [newTab])` :::note Although `page`, `view`, and `url` are all available to specify navigation, only one will be applied at a time. If more than one of these parameters is included in the function, the `page` parameter will receive top priority, followed by `view`, and then `url`. ::: ### Parameters Type | Parameter | Description ------- | ------- | ------ String |`page` | The URL of a Perspective page to navigate to. The path can include an optional leading slash, so "new-page" and "/new-page" both navigate the Session to the "new-page" page. See [Page URLs](ignition-modules\perspective\pages-in-perspective.md#page-urls) for more information. String |`url` | The URL of a web address to navigate to. If the `page` or `view` parameters are specified, then this parameter is ignored. String |`view` | If specified, will navigate to a specific view. Navigating to a view with this parameter does not change the address in the web browser. Thus the web browser's back button will not be able to return the user to the previous view. If the `page` parameter is specified, then this parameter is ignored. Dictionary[String, String] | `params` | Used only in conjunction with the view parameter, Dictionary of values to pass to any parameters on the view. [optional] String |`sessionId` | Identifier of the Session to target. If omitted, the current Session will be used automatically. When targeting a different Session, then the pageId parameter must be included in the call. [optional] String |`pageId` | Identifier of the page to target. If omitted, the current page will be used automatically. [optional] Boolean| `newTab` | If True, opens the contents in a new tab. [optional] ### Returns Nothing ### Scope Gateway, Perspective Session :::note This function will only work in the Gateway scope if both `sessionId` and `pageId` are supplied to the call. ::: ## Code Examples ```python title="Code Snippet - Page" # Navigating to a perspective page. The 'page' parameter doesn't require the use of a keyword argument. system.perspective.navigate('/new-page') ``` ```python title="Code Snippet - Web Address" # Navigating to a web address. Note that we're using a keyword argument here. # web addresses must use a scheme (like 'http://') at the beginning system.perspective.navigate(url = 'http://docs.inductiveautomation.com') # Navigating to a perspective page with url parameters. system.perspective.navigate(url='http://:/data/perspective/client//view?key=8') ``` ```python title="Code Snippet - Notifications" # Initiating a call. system.perspective.navigate(url= "tel:+1999-999-9999") # Initiating a text with message contents. system.perspective.navigate(url= "sms:+1-999-999-9999?&body=My%20Message") # Initiating an email. system.perspective.navigate(url= "mailto:someone@example.com?subject=This%20is%20the%20subject&cc=someone_else@example.com&body=This%20is%20the%20body") ``` ```python title="Code Snippet - View" # Navigating to a new view. Again, we need to use a keyword argument. We are passing in two parameters, called "myParam" and "myParam2". system.perspective.navigate(view = 'folder/myView', params = {'myParam':1,'myParam2':'Test'}) ```