# Hide empty variable in request link

**URL:** <https://community.postman.com/t/hide-empty-variable-in-request-link/37550>\
**Category:** Help Hub\
**Tags:** variables\
**Created:** [July 26, 2022, 3:14am UTC](https://community.postman.com/t/hide-empty-variable-in-request-link/37550 "2022-07-26T03:14:01Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![w4dd325](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/w4dd325/32/12436_2.png) [@w4dd325](https://community.postman.com/u/w4dd325)\
**Post date:** [July 28, 2022, 12:04am UTC](https://community.postman.com/t/hide-empty-variable-in-request-link/37550/3 "2022-07-28T00:04:02Z")

</div>

> [@nickychengv](#):
>
> pm.request.url.query.all() only return key-value but not “description”.

Hi @nickychengv, Why do you need to return the description? Descriptions are blank in your screenshot.

* * *

I don’t know the exact syntax, but you could try something like this (depending on your conditional statement);

```auto
pm.request.url.query.add("camera={{camera}}")

pm.request.url.query.remove("camera={{camera}}")

```

* * *

Some more info on this thread;

> [@Modify query param in pre-request script](https://community.postman.com/t/modify-query-param-in-pre-request-script/8880/6):
>
> to add query params there is 2 ways pm.request.addQueryParams("auth\_username={{username}}") pm.request.url.query.add("auth\_password={{password}}") you can loop over pm.request.url.query it is an array of objects, every object has 3 properties { disabled: true, // only if it is disabled key: "auth\_username", value: "{{username}}", } you can find what you are looking for and set it like you wan’t

---

_[View the full topic](https://community.postman.com/t/hide-empty-variable-in-request-link/37550)._
