---
title: "How to inject parameters with parameter injections"
canonical: "https://support.appfire.com/space/REPS/472914148/How%20to%20inject%20parameters%20with%20parameter%20injections"
format: markdown
---
> Macro (aura-html)

This guide will help you get a better understanding of [parameter injections](https://appfire.atlassian.net/wiki/pages/createpage.action?spaceKey=SUP&title=Parameter%20Injection).

## Suggested Reading

Read these guides first before continuing:

- [Understanding Key Concepts](https://appfire.atlassian.net/wiki/spaces/REPS/pages/472914156)
- [Parameter Injections](https://appfire.atlassian.net/wiki/spaces/SUPSR/pages/479035812)
- [Supplier Keychains](https://appfire.atlassian.net/wiki/spaces/SUPSR/pages/479035487)
- [Chaining Keys with Keychains](https://appfire.atlassian.net/wiki/spaces/REPS/pages/472914144)

# Understanding Parameter Injections

Various Reporting macros support [parameter injections](https://appfire.atlassian.net/wiki/spaces/SUPSR/pages/479035812), such as [Report Variable](https://appfire.atlassian.net/wiki/spaces/REPS/pages/472915060) and [Report Eval](https://appfire.atlassian.net/wiki/spaces/REPS/pages/472914949), just to name a few.

Injecting parameters into a macro means that you can take a parameter of a [Supplier](https://appfire.atlassian.net/wiki/spaces/SUPSR) and inject the value of that parameter into that macro.

For example, using the [Report Variable](https://appfire.atlassian.net/wiki/spaces/REPS/pages/472915060) macro, you can declare a variable with a constant value of "10". But what if you wanted to declare a value that's more dynamic? Let's say you want to declare a variable with a number that's equivalent to the number of characters in the title of the current page.

The keychain for that would be: "*content:title > text:size*" and will give you the result of "<span style="color: #172b4d">46</span>".

To use that with the [Report Variable](https://appfire.atlassian.net/wiki/spaces/REPS/pages/472915060) macro, you will have to "inject" that keychain value into it. You do that by entering *%content:title > text:size%* into the **Value** parameter of the [Report Variable](https://appfire.atlassian.net/wiki/spaces/REPS/pages/472915060).

Notice the keychain is surrounded by the "%" character.

Now that the [Report Variable](https://appfire.atlassian.net/wiki/spaces/REPS/pages/472915060) macro has been injected with the keychain as its value, you can now use that value with other Reporting-related macros.

# Example 1: Showing the Page Title

Let's start with something basic and display the page's title.

1. Create a [Report On](https://appfire.atlassian.net/wiki/spaces/REPS/pages/472915036) macro.
2. Tick the **Injected** parameter.
3. Within the report-on macro, type in "*%content:title%*".
4. You should have something like this:  
  
> Macro (inline-media-image)

  
  
Which should display this:   
"Injecting Parameters with Parameter Injections"

# Example 2: Showing the Page Title of the Parent Page

Let's show the title of the parent of the current page.

1. First, create a [Report Variable](https://appfire.atlassian.net/wiki/spaces/REPS/pages/472915060) macro.
2. For the **Name** parameter, type in "*Parent Name*".
3. Now, let's inject the following keychain into the **Value** parameter:  
*%page:parent > page:title%*
4. Create a [Report Info](https://appfire.atlassian.net/wiki/spaces/REPS/pages/472915000) macro so we can get the results of the **Value** from [Report Variable](https://appfire.atlassian.net/wiki/spaces/REPS/pages/472915060).
5. For the **Key** parameter, type in "*variable:Parent Name*".  
(Notice that the variable is called using a keychain using the [Variable Supplier](https://appfire.atlassian.net/wiki/spaces/SUPSR/pages/479036241).)
6. You should have something like this:  
  
> Macro (inline-media-image)

  
  
Which should result in this:
  <span style="color: #172b4d">"Intermediate Tutorials"</span>

# Example 3: Displaying a Message with Multiple Values from Different Suppliers

Let's display a message that contains several parameter injections.

1. Start by creating a report-variable.
2. For the **Name** parameter, type in "*Message*".
3. For the **Value** parameter, let's type in this text string which includes some [injected parameters](https://appfire.atlassian.net/wiki/spaces/SUPSR/pages/479035812):  
"*Created by %page:creator > user:full name% on %page:creation date > date:dd-MMM-yyyy%*"
4. Now, create a [Report Info](https://appfire.atlassian.net/wiki/spaces/REPS/pages/472915000) macro.
5. For the **Key** parameter, type in "*variable:Message*".
6. You should now have something that looks like this:  
  
> Macro (inline-media-image)

  
Which should result in this:
  "<span style="color: #172b4d">Created by Ted Mahsun on 18-Sep-2014</span>"