---
title: "How to go to another location on Run button push"
canonical: "https://support.appfire.com/space/SUPPORT/89138615/How%20to%20go%20to%20another%20location%20on%20Run%20button%20push"
format: markdown
---
> Macro (excerpt)
> 
> Using **run** parameters to determine a page to go to when the run button is pressed.

# Links

- [How to do SQL database operations on lists of data](https://appfire.atlassian.net/wiki/spaces/SUPPORT/pages/89137777)

# Alternative 1

## Steps

1. Create a user macro **goto-url**
  - No macro body
  - Output HTML
2. Determine the url you need
3. Create the **run** markup as needed

## Example

```
{run:replace=name:My new page|titleRun=New page}

{goto-url:url=$base_url/pages/createpage-name.action?name=$name&spaceKey=$space_key&fromPageId=$page_id}

{run}

```

> ✅ **Getting Confluence urls to use**
> ✅ 
> ✅ Any macro that produces a link on a page can be used to create a url to use in this scenario. For example the **add-page** macro can create some complex urls for creating pages with various parameters. Use this macro on some test page to get the url you want. Copy and paste into your **run** macro markup substituting run parameter values - user defined or [Pre-defined variables](https://appfire.atlassian.net/wiki/spaces/RUN/pages/73074529).

# Alternative 2

This uses a more complex user macro to extract the link from the body and then redirect to the referenced link.

## Steps

1. Create a user extract-link user macro or use the **extract-link** macro from [Run Self-Service Reports for Confluence](https://appfire.atlassian.net/wiki/spaces/RUN).
  - Has macro body - use **Convert wiki markup to HTML** so it will render embedded macros and markup
  - Output HTML
2. Create the **run** markup as needed
3. Create the body of the run macro so that it produces the link desired.

## Examples

```
{run:titleRun=Show going to a page on button press|replace=page:home}
{extract-link:redirect=true} Some text [$page] some more text {extract-link}
{run}

```

```
{run:titleRun=Create a page|replace=name:example}
{extract-link:redirect=true} 
{add-page:name=$name|template=template1|parent=@self}This is ignored{add-page}
{extract-link}
{run}

```