# Bind Text Element to selected row's email address

**URL:** https://community.weweb.io/t/bind-text-element-to-selected-rows-email-address/4237
**Category:** Ask us anything
**Tags:** formulas, binding
**Created:** [September 6, 2023, 8:36pm UTC](https://community.weweb.io/t/bind-text-element-to-selected-rows-email-address/4237 "2023-09-06T20:36:24Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![michel](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/michel/32/4715_2.png) [@michel](https://community.weweb.io/u/michel)
#### Post date: [September 6, 2023, 8:36pm UTC](https://community.weweb.io/t/bind-text-element-to-selected-rows-email-address/4237/1 "2023-09-06T20:36:24Z")

</div>

Using the datagrid element, there is a ‘delete’ icon provided in the actions column. When the ‘delete’ icon is clicked, a modal window opens and asks for confirmation where a workflow captures the record id. If confirmed, then a workflow deletes the row (using the selected record id), fetches the collection, and closes the modal window.

Question: how do i bind the text element of the confirmation window to display the selected row’s email address? I am assuming that the formula would be something like:

Users.data[0].email

Except, how do I substitute the ID of 0 with the actual variable used to store the selected row?

---

<div class="post-metadata">

### Author: ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)
#### Post date: [September 6, 2023, 9:03pm UTC](https://community.weweb.io/t/bind-text-element-to-selected-rows-email-address/4237/2 "2023-09-06T21:03:48Z")

</div>

1. You create a **helperVariable** (of type text I think for ID, or email or whatever)
2. You add a workflow onclick to your delete icon → set variable value of **helperVariable** to your data, it should be there from the context
3. Display the data from **helperVariable** in your modal or wherever you need.

---

<div class="post-metadata">

### Author: ![michel](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/michel/32/4715_2.png) [@michel](https://community.weweb.io/u/michel)
#### Post date: [September 7, 2023, 12:10am UTC](https://community.weweb.io/t/bind-text-element-to-selected-rows-email-address/4237/3 "2023-09-07T00:10:56Z")

</div>

Your approach worked brilliantly. Thank you so much for the guidance again!

I am new to WeWeb and front-end development (as a whole), but your responses are helping me truly understand common best practices.

I am so thankful for both WeWeb, the app, and the community.

---

<div class="post-metadata">

### Author: ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)
#### Post date: [September 7, 2023, 2:22am UTC](https://community.weweb.io/t/bind-text-element-to-selected-rows-email-address/4237/4 "2023-09-07T02:22:25Z")

</div>

One day you’ll hopefully help the others too! 🙂
