title: Return value not being picked up in anther return payload
body: <p>I have an issue where a function that returns a value is not being pulled through in another function. Here is my code</p>
  
  <pre class="lang-js prettyprint-override"><code>public _getProfileToUpdate() {
    return {
      corporateId: this.storeService.setStoreData().profile.preferred_username[1],
      id: this.storeService.setStoreData().profile.sub,
      firstName: this.userFormGroup.controls.firstName.value,
      lastName: this.userFormGroup.controls.lastName.value,
      email: this.userFormGroup.controls.email.value,
      mobile: this.userFormGroup.controls.mobile.value,
      workNumber: this.userFormGroup.controls.workNumber.value,
      roleId: this.sortRoleId()
    };
  }
  
  sortRoleId() {
    this._contentService._getRoles().subscribe((resp) =&gt; {
      const search = this.storeService.setStoreData().profile.role;
      const index = Object.values(resp.roles).indexOf(search);
      const result = Object.keys(resp.roles)[index];
      return result;
    })
  }
  </code></pre>
  
  <p>So there is a "result" value that I am trying to send to the "roleId" value in the other function but it is showing as undefined.</p>