# Write to an external tag from node red

**URL:** <https://discourse.nodered.org/t/write-to-an-external-tag-from-node-red/18738>\
**Category:** General\
**Created:** [3 December 2019 12:40 UTC](https://discourse.nodered.org/t/write-to-an-external-tag-from-node-red/18738 "2019-12-03T12:40:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohammedtaha](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@mohammedtaha](https://discourse.nodered.org/u/mohammedtaha)\
**Post date:** [3 December 2019 12:40 UTC](https://discourse.nodered.org/t/write-to-an-external-tag-from-node-red/18738/1 "2019-12-03T12:40:44Z")

</div>

hello i need to write to ana external tag, i want to use a slider and assigne it to the output on the kepserverx

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [4 December 2019 11:26 UTC](https://discourse.nodered.org/t/write-to-an-external-tag-from-node-red/18738/2 "2019-12-04T11:26:29Z")

</div>

Sorry, you will need to provide a lot more information if you want anyone to understand. Currently, we have no way of knowing what kind of "tag" you refer to.

---

<div class="post-metadata">

**Author:** ![mohammedtaha](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@mohammedtaha](https://discourse.nodered.org/u/mohammedtaha)\
**Post date:** [4 December 2019 12:26 UTC](https://discourse.nodered.org/t/write-to-an-external-tag-from-node-red/18738/3 "2019-12-04T12:26:04Z")

</div>

![222](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/c/cf72e2b4e34be2d5aacd49e8e6d1363813d5adfa.jpeg)

i want the slider's value to be write in the id siemens.s7.cw, thanks

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [4 December 2019 13:22 UTC](https://discourse.nodered.org/t/write-to-an-external-tag-from-node-red/18738/4 "2019-12-04T13:22:54Z")

</div>

> [@mohammedtaha](#):
>
> i want the slider's value to be write in the id siemens.s7.cw, thanks

Urm, doesn't a slider return a number? If so, you will need to translate the number to the "tag" by using JSONata with a change node or using a function node. You will want to put the translation into a JavaScript flow or global variable.

---

<div class="post-metadata">

**Author:** ![mohammedtaha](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@mohammedtaha](https://discourse.nodered.org/u/mohammedtaha)\
**Post date:** [4 December 2019 13:30 UTC](https://discourse.nodered.org/t/write-to-an-external-tag-from-node-red/18738/5 "2019-12-04T13:30:55Z")

</div>

my problem is about how to put the value into the output siemens.s7.cw

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [4 December 2019 13:42 UTC](https://discourse.nodered.org/t/write-to-an-external-tag-from-node-red/18738/6 "2019-12-04T13:42:48Z")

</div>

Oh, that wasn't clear.

You have made life rather hard for yourself since that tag isn't an object. Because it is part of an array, you will have to search/filter the array for the entry that contains the id matching your requirement and then adding the slider's output to that array entry.

You can do that using a change node with JSONata $filter or using a function node with the JavaScript `Array.filter()` function. Both have documentation online.

---

<div class="post-metadata">

**Author:** ![mohammedtaha](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@mohammedtaha](https://discourse.nodered.org/u/mohammedtaha)\
**Post date:** [4 December 2019 14:18 UTC](https://discourse.nodered.org/t/write-to-an-external-tag-from-node-red/18738/7 "2019-12-04T14:18:47Z")

</div>

![3333](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/a/a204983007d3cb40542dd9156b62ee3695fa4df1.jpeg)

did you mean something like this ?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [4 December 2019 14:59 UTC](https://discourse.nodered.org/t/write-to-an-external-tag-from-node-red/18738/8 "2019-12-04T14:59:43Z")

</div>

I was more expecting the translation to happen on the output from the slider node. You only need it on the input side if the values can also change from some other source. In that case, you need to convert from the data back to the slider value on the input.
