Bind Text Element to selected row's email address

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?

  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.
2 Likes

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.

1 Like

One day you’ll hopefully help the others too! :slight_smile:

2 Likes