# Cannot use {{$randomPhoneNumberFormat}}

**URL:** <https://community.postman.com/t/cannot-use-randomphonenumberformat/35497>\
**Category:** Help Hub\
**Created:** [May 20, 2022, 3:51am UTC](https://community.postman.com/t/cannot-use-randomphonenumberformat/35497 "2022-05-20T03:51:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![salomae](https://avatars.discourse-cdn.com/v4/letter/s/2acd7d/32.png) [@salomae](https://community.postman.com/u/salomae)\
**Post date:** [May 20, 2022, 3:51am UTC](https://community.postman.com/t/cannot-use-randomphonenumberformat/35497/1 "2022-05-20T03:51:58Z")

</div>

Trying to get random phone number data without “( )”. I just need phone number value between length 8-10. I tried using “{{$randomPhoneNumberFormat}}”, But this doesn’t work.  
Tried tried from article [Dynamic variables — Postman Quick Reference Guide Version 1.8.0 - August 2021 documentation (postman-quick-reference-guide.readthedocs.io)](https://postman-quick-reference-guide.readthedocs.io/en/latest/dynamic-variables.html)

 ![image](https://us1.discourse-cdn.com/getpostman/original/2X/a/a881d09fb232ecbfb9ff7c103067f443c7b26350.png)  
Used this:

```auto
const phone = pm.variables.replaceIn("{{$randomPhoneNumberFormat}}");
pm.environment.set("mobilePhone", phone);

```

Got this:

 ![image](https://us1.discourse-cdn.com/getpostman/original/2X/4/4ba04b77a8f269426088e7752098212b10ebb438.png)
