# Use portal ID variable in fields.json

**URL:** <https://community.hubspot.com/t/use-portal-id-variable-in-fields-json/105394>\
**Category:** CMS Development\
**Created:** [April 22, 2024, 8:50am UTC](https://community.hubspot.com/t/use-portal-id-variable-in-fields-json/105394 "2024-04-22T08:50:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RoFiks](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rofiks/32/202358_2.png) [@RoFiks](https://community.hubspot.com/u/RoFiks)\
**Post date:** [April 22, 2024, 8:50am UTC](https://community.hubspot.com/t/use-portal-id-variable-in-fields-json/105394/1 "2024-04-22T08:50:33Z")

</div>

Hi there,

Is it possible to use a variable, like the {{ portal\_id }} in a fields.json file of a module? I would like to use a default value for a URL field linking to a mp4 file in my custom theme folder. When I use

```lia-code-sample
 "default" : {
 "content_id" : null,
 "href" : "https://f.hubspotusercontent10.net/hubfs/{{ portal_id }}/media/example.mp4",
 "type" : "EXTERNAL"
 }

```

the {{ portal\_id }} variable isn’t working. Is there a solution to this?

Thanks for your help!

---

<div class="post-metadata">

**Author:** ![GRajput](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/grajput/32/102020_2.png) [@GRajput](https://community.hubspot.com/u/GRajput)\
**Post date:** [April 22, 2024, 1:50pm UTC](https://community.hubspot.com/t/use-portal-id-variable-in-fields-json/105394/2 "2024-04-22T13:50:10Z")

</div>

Hi @RoFiks

Nope because in field.json we can only write HubSpot fields in JSON format. But you can set the default value of the URL field which can do in that field also in your template. Use { “default”: “Your Value” }.

I hope this will help you out. Please mark it as **Solution Accepted and upvote** to help another Community member.  
Thanks!
