> For the complete documentation index, see [llms.txt](https://docs.emobiq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.emobiq.com/emobiq-client/006-actions-and-visual-logic/action-reference/cordova/global/getpreviouspage.md).

# getPreviousPage

## Description

Returns the name of the page the user was on before the current page.

## Input / Parameter

N/A

## Output

| Description                            | Output Type |
| -------------------------------------- | ----------- |
| Returns the name of the previous page. | String/Text |

## Callback

N/A

## Video

Coming Soon.

## Example

The user wants to get the name of the previous page they were on.

### Steps

| No. | Description                      |                                                                                                                                             |
| --- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| 1.  | ![](/files/TTmLCzPZXMcMHEb69loC) | Drag a button to a page in the mobile designer. Select the event `click` for the button and drag the `gotoPage` function to the event flow. |
| 2.  | ![](/files/BUgRi7O9C9dpDuexR3lm) | Fill in the parameters of the function.                                                                                                     |
| 3.  | ![](/files/f8ry79z7jw8gIaNd2NaR) | Drag the `console` function to the node below the `gotoPage` function.                                                                      |
| 4.  | ![](/files/r49JhQL9Kf2LyyqQBAG7) | Select the `function` parameter input type for the value parameter.                                                                         |
| 5.  | ![](/files/rO5sJXUeOFVHxydHQYVv) | Drag the `getPreviousPage` function to the node in the subflow.                                                                             |

### Result

When the button is pressed, the page will navigate to pgWelcome and the console will show the name of the previous page.

## Links
