# Obtaining httpAdminRoot in a function node in a subflow

**URL:** <https://discourse.nodered.org/t/obtaining-httpadminroot-in-a-function-node-in-a-subflow/82783>\
**Category:** General\
**Created:** [11 November 2023 12:33 UTC](https://discourse.nodered.org/t/obtaining-httpadminroot-in-a-function-node-in-a-subflow/82783 "2023-11-11T12:33:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gregorius](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gregorius/32/73816_2.png) [@gregorius](https://discourse.nodered.org/u/gregorius)\
**Post date:** [11 November 2023 12:33 UTC](https://discourse.nodered.org/t/obtaining-httpadminroot-in-a-function-node-in-a-subflow/82783/1 "2023-11-11T12:33:04Z")

</div>

Hi There!

The background to this question is this [decision tree flow](https://flowhub.org/f/7c29441a5cb63c9e):

![decisiontree4](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/9/19abda54ce467a44e407edfe0678dec02b893cae.gif)

I use subflows to create questions that are interconnected so that a questionnaire is generated but also the flow can be used as part of another flow.

What I would like to do is create links to the question nodes, i.e., at the bottom of the dashboard template there should be a link to the node which represents the question.

Using the deeplinking feature of Node-RED 3.1.x, the link would be in the form of `http://noderedhost:1880/httpAdminRoot/#node/node-id` - the link needs to be generated in the subflow - that's the problem.

Getting the node-id in a subflow isn't the problem, that's just: `node.id.split("-")[0]` (This is inside a function node inside the subflow, the node id is a combination of two ids, hence the split on minus.)

I haven't yet figured out how to get the httpAdminRoot to complete the link (I would ignore the host put since the dashboard is hosted on the same instance). I can't just do `/#node/node-id` since the user (like me) might have configured a httpAdminRoot in the settings.js.

Any pointers would be appreciated!

Cheers!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [10 January 2024 12:33 UTC](https://discourse.nodered.org/t/obtaining-httpadminroot-in-a-function-node-in-a-subflow/82783/2 "2024-01-10T12:33:52Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
