# Help with paramertization

**URL:** <https://community.postman.com/t/help-with-paramertization/9108>\
**Category:** Help Hub\
**Created:** [November 19, 2019, 5:37pm UTC](https://community.postman.com/t/help-with-paramertization/9108 "2019-11-19T17:37:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![christopherktom](https://avatars.discourse-cdn.com/v4/letter/c/13edae/32.png) [@christopherktom](https://community.postman.com/u/christopherktom)\
**Post date:** [November 19, 2019, 5:37pm UTC](https://community.postman.com/t/help-with-paramertization/9108/1 "2019-11-19T17:37:50Z")

</div>

I have a request and I want to parameterize some fields in the Body, below is an example. I appreciate any help.

Request:  
[http://website/request](http://website/request)

Body: (I want to parametrize the first and last names only)  
request": {  
“FirstName”: “{{chris}}”,  
“LastName”: “{{tom}}”,  
“Email”: “[ctom@company.net](mailto:ctom@company.net)”,

---

<div class="post-metadata">

**Author:** ![john-paul](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/john-paul/32/919_2.png) [@john-paul](https://community.postman.com/u/john-paul)\
**Post date:** [November 19, 2019, 6:40pm UTC](https://community.postman.com/t/help-with-paramertization/9108/2 "2019-11-19T18:40:10Z")

</div>

Hi Chris,

The way you have that setup should work fine:

Body:

```auto
{
"FirstName":"{{first_name}}",
"LastName":"{{last_name}}"
}

```

You then just need to add `first_name` and `last_name` as variables either:

- In an Environment
- As Global Variables

See [Intro to environments and globals](https://learning.getpostman.com/docs/postman/environments-and-globals/intro-to-environments-and-globals/) on our Learning Center for more info.

You can also set them programmatically from the [Sandbox](https://learning.getpostman.com/docs/postman/scripts/postman-sandbox-api-reference/#pmvariables), using `pm.variables.set('name','value')`. This will declare a run-scoped variable with whatever value you want — useful when you need to set this value based on (e.g.) response data from another request.

---

<div class="post-metadata">

**Author:** ![christopherktom](https://avatars.discourse-cdn.com/v4/letter/c/13edae/32.png) [@christopherktom](https://community.postman.com/u/christopherktom)\
**Post date:** [November 19, 2019, 9:20pm UTC](https://community.postman.com/t/help-with-paramertization/9108/3 "2019-11-19T21:20:09Z")

</div>

Hi JP,

I appreciate your help.

1. I read the Postman article on parameterization and I was hoping to use the Collection Runner with a CVS/JSON file that contains my test data.

2. I can’t test our API yet as it’s still being worked on so I’m wondering if there’s a public API GET request with a payload that I could use to play around with?

---

<div class="post-metadata">

**Author:** ![john-paul](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/john-paul/32/919_2.png) [@john-paul](https://community.postman.com/u/john-paul)\
**Post date:** [November 19, 2019, 9:23pm UTC](https://community.postman.com/t/help-with-paramertization/9108/4 "2019-11-19T21:23:58Z")

</div>

Happy I could help!

Yep! Try Postman Echo: [https://docs.postman-echo.com/](https://docs.postman-echo.com/)

---

<div class="post-metadata">

**Author:** ![christopherktom](https://avatars.discourse-cdn.com/v4/letter/c/13edae/32.png) [@christopherktom](https://community.postman.com/u/christopherktom)\
**Post date:** [November 25, 2019, 6:59pm UTC](https://community.postman.com/t/help-with-paramertization/9108/5 "2019-11-25T18:59:03Z")

</div>

Hey John, I believe I finally got the parametrization working. What I’d like to do next is see which row is being used for each run. Using the CSV File example below, when I use the Collection Runner, in the output, I’d like to see something like “Test Data: InvalidEmail.”

If you know of a better way to do this then plz let me know.

CSV File:  
LOEmail,BranchNumber,AppId,BorrowerFirstName,BorrowerLastName  
[HappyPath,srao@company.com](mailto:HappyPath,srao@company.com),331,9464099213815567,Chris,rao  
[InvalidEmail,srao@company.net](mailto:InvalidEmail,srao@company.net),331,9464099213815567,Chris,rao

---

<div class="post-metadata">

**Author:** ![john-paul](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/john-paul/32/919_2.png) [@john-paul](https://community.postman.com/u/john-paul)\
**Post date:** [January 25, 2020, 12:33am UTC](https://community.postman.com/t/help-with-paramertization/9108/6 "2020-01-25T00:33:50Z")

</div>

Hi @christopherktom

Long delay or follow-up here, but in case you haven’t found it yet you can use `pm.info.iteration` to get the row number of the CSV.

But, you can totally do it your way by using:  
`console.log(pm.iterationData.get('LOEmail'));`

Which will log the value you noted to the console (`Command + Option + C` on Mac)
