Problem changing url according to my select

Here is my JS query:

According to the choice of my select it will take an id that I use and recover to put it in a url
this is what it does when i run this code:

I retrieve the value of selectedOrgZerotierNetworkId and I put it in rest api as follows:

but it puts it in red and it tells me that the variable is not defined. I don't know what the problem is. Any help will be really appreciated. Thanks in advance

Hi @Diioozi

Thanks for reaching out! In the second screenshot, it seems like selectedOrgZerotierNetworkId is propertly getting set & passed to query19.

When working with additionalScope, the additionalScope value will always be red/marked as undefined in the UI for the triggered query. This is because it is not defined until you trigger the JS query with additionalScope.

If you run the JS query, which triggers the rest query, is the rest query working as expected? You can check the state of the query to see if the id was properly set: