this.Parameter issue in XCode

Hi,

Strange issue (I think), the following code works fine using both Fuse Preview and when I scan the QR code.
However, when I run it from within XCode on my iPhone or test it in Test Flight, I get the following error.
“Error: TypeError: undefined is not an object (evaluting ‘undefined.Parameter’)”

It appears that it is not recognising ‘this’?
Any idea what is happening and how I can fix it?

Thank you!!!

this.Parameter.onValueChanged(module, function(userID){
    if(userID){
        Data.init(userID).then(function (result){
            result.forEach(element => {
                user.add(element);
            });
        })
        .catch(function(e) {
            console.log("error")
        });
    }
});

Here’s the call.

function gotoMembersDetailPage(arg){
    var selectedMemberID = Observable();
	selectedMemberID.add(arg.data.userID);
    router.push("memberDetailsPage", selectedMemberID.value);
}