# Click Handler for Circle/Nodes

**URL:** <https://talk.observablehq.com/t/click-handler-for-circle-nodes/8682>\
**Category:** Help\
**Created:** [January 8, 2024, 5:45pm UTC](https://talk.observablehq.com/t/click-handler-for-circle-nodes/8682 "2024-01-08T17:45:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tvxer](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/tvxer/32/8420_2.png) [@tvxer](https://talk.observablehq.com/u/tvxer)\
**Post date:** [January 8, 2024, 5:45pm UTC](https://talk.observablehq.com/t/click-handler-for-circle-nodes/8682/1 "2024-01-08T17:45:02Z")

</div>

Hi there,

I have a network graph. I want to select the node on the graph that would return the source/target id for example to a variable. That I can used that variable id to query another set of table.

So, how do I return the value to the cell? I can see the value on the console, but I just don’t know how to return the value to the cell so it can be used for later.

---

<div class="post-metadata">

**Author:** ![mootari](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mootari/32/581_2.png) [@mootari](https://talk.observablehq.com/u/mootari)\
**Post date:** [January 8, 2024, 8:15pm UTC](https://talk.observablehq.com/t/click-handler-for-circle-nodes/8682/2 "2024-01-08T20:15:18Z")

</div>

Do you have a notebook that you can share?

A common method is to expose the value as a `.value` property on the outermost element and turn your cell into a view:

> **[What has viewof ever done for us?!](https://observablehq.com/@mootari/what-has-viewof-ever-done-for-us)**
>
> A short introduction to \`viewof\`, in response to this post. \`viewof\` is an Observable macro (i.e., a "magic word") that allows you to create user interfaces for your values. Observable cells by themselves are rather boring: they can only store...

---

<div class="post-metadata">

**Author:** ![tvxer](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/tvxer/32/8420_2.png) [@tvxer](https://talk.observablehq.com/u/tvxer)\
**Post date:** [January 9, 2024, 1:58pm UTC](https://talk.observablehq.com/t/click-handler-for-circle-nodes/8682/3 "2024-01-09T13:58:44Z")

</div>

I used mutable, it seems to do the trick.

Now I am trying to generate a new graph from the new value generated near the end of the notebook using the mutable syntax. I am trying to see how I can parse that value to the beginning of the notebook, so it can generate a new graph.

---

<div class="post-metadata">

**Author:** ![tvxer](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/tvxer/32/8420_2.png) [@tvxer](https://talk.observablehq.com/u/tvxer)\
**Post date:** [January 9, 2024, 1:59pm UTC](https://talk.observablehq.com/t/click-handler-for-circle-nodes/8682/4 "2024-01-09T13:59:00Z")

</div>

i will take a look at viewof now and see how it goes.
