# Passing variable through this.Parameter.map returns Observable without value

**URL:** <https://forums.fusetools.com/t/passing-variable-through-this-parameter-map-returns-observable-without-value/6866>\
**Category:** How-to Discussions\
**Created:** [January 29, 2017, 12:44pm UTC](https://forums.fusetools.com/t/passing-variable-through-this-parameter-map-returns-observable-without-value/6866 "2017-01-29T12:44:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ferdinand.berthelsen](https://avatars.discourse-cdn.com/v4/letter/f/57b2e6/32.png) [@ferdinand.berthelsen](https://forums.fusetools.com/u/ferdinand.berthelsen)\
**Post date:** [January 29, 2017, 12:44pm UTC](https://forums.fusetools.com/t/passing-variable-through-this-parameter-map-returns-observable-without-value/6866/1 "2017-01-29T12:44:17Z")

</div>

Hello!

I’m struggling with passing and using a variable through this.Parameter.map(). I have in Page1.js:

```
router.push("viewProfile", { userId: SelectedFriendId.value });

```

Then in Page2.js it’s recieved like this (from example found in docs about navigation):

```
var userId = this.Parameter.map(function(param) {
    return param.userId;
});

```

Displaying the value in Page2.ux works fine, but then using the variable in Page2.js is a bit of a hassle since it has apparently along the way become an Observable. Well that’s fine but when trying to access that Observable’s .value it simply outputs as “undefined”… How do I use this passed variable in JS???

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)\
**Post date:** [January 29, 2017, 3:05pm UTC](https://forums.fusetools.com/t/passing-variable-through-this-parameter-map-returns-observable-without-value/6866/2 "2017-01-29T15:05:13Z")

</div>

Hi!

`this.Parameter` is an observable, correct. This means the value is not available synchronously. Also, it can change at any time, so you need to listen for changes and deal with it accordingly. This is one way :

```
 this.Parameter.onValueChanged(module, function(param) {
     // use param here 
 }
```

---

<div class="post-metadata">

**Author:** ![ferdinand.berthelsen](https://avatars.discourse-cdn.com/v4/letter/f/57b2e6/32.png) [@ferdinand.berthelsen](https://forums.fusetools.com/u/ferdinand.berthelsen)\
**Post date:** [January 30, 2017, 2:02pm UTC](https://forums.fusetools.com/t/passing-variable-through-this-parameter-map-returns-observable-without-value/6866/3 "2017-01-30T14:02:11Z")

</div>

Ok i see, I’ll give it a try.  
Again thanks for the help and quick response 🙂
