# Share property information

**URL:** <https://discourse.nodered.org/t/share-property-information/6912>\
**Category:** Developing Nodes\
**Created:** [17 January 2019 09:01 UTC](https://discourse.nodered.org/t/share-property-information/6912 "2019-01-17T09:01:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simo219h](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/simo219h/32/7229_2.png) [@Simo219h](https://discourse.nodered.org/u/Simo219h)\
**Post date:** [17 January 2019 09:01 UTC](https://discourse.nodered.org/t/share-property-information/6912/1 "2019-01-17T09:01:11Z")

</div>

Hi,

I am trying to make a node to control some digital outputs. I am facing a problem, because my digital outputs have the possibility to use external voltage reference. I have made the node, but I cannot seem to find a way for implementing a feature for when I select the node to be external voltage or not, to update all the nodes with that option in my current flow.

Here is my "edit dialoag" html code

```
<div class="form-row">
    <label for="node-input-vexternal"><i class="fa fa-plug"></i></i><span data-i18n="digital-outputs.label.source"></span></label>
	<select type="text" id="node-input-vexternal">
        <option value="no" data-i18n="digital-outputs.ext_v.no"></option>
        <option value="yes" data-i18n="digital-outputs.ext_v.yes"></option>
    </select>
</div>

```

Here is my .js code the node.

```
if(this.v_external === "yes") {
    fs.writeFileSync(ENA_V_DO_path, '0');
    }
    else if(this.v_external === "no") {
        fs.writeFileSync(ENA_V_DO_path, '1');
    }
}

```

I was thinking something like adding the _oneditprepare_ to poll the directories _ENA\_V\_DO\_path_. But I dont know if its is possible to use nodejs filesystem api inside the _oneditprepare_ object.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [17 January 2019 09:10 UTC](https://discourse.nodered.org/t/share-property-information/6912/2 "2019-01-17T09:10:23Z")

</div>

What you have will require you to edit each node / gpio pin. You could possibly create a config node that sits behind that that all your nodes could share but then they would all be set to the same value all the time. See the serial port or mqtt ports for examples of nodes that use config nodes.

The oneditprepare runs in the browser side so has no access to the filesystem - you could use an ajax/http call to call back to the runtime (again like the serialport checks for avaliable ports) - and maybe query an environment variable or some other long term value.

---

<div class="post-metadata">

**Author:** ![Simo219h](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/simo219h/32/7229_2.png) [@Simo219h](https://discourse.nodered.org/u/Simo219h)\
**Post date:** [17 January 2019 09:14 UTC](https://discourse.nodered.org/t/share-property-information/6912/3 "2019-01-17T09:14:47Z")

</div>

Thanks for the reply. I will try to look further on the config node, even though it seems a bit overkill. Maybe I should just create a node besides the digital output node, that controls if the external voltage reference is on or not.
