Hello
I want to display data using a data table.
The data table has a list of users
When the selected user is changed, I want to add the selected user's email address to a text box
Annoyingly there doesnt seem to be an event in Data Table for the selected row has been changed
How can I do this?
Paul
Hi @paulinuk ,
I think the easiest way for this is to set the Default property to a variable that is then updated by either selecting an Email address in the DataTable, or by entering a text:
TextInput.Default = varEmail
TextInput.OnChange = Set(varEmail,Self.Text)
EmailColumn1.OnChange = Set(varEmail, DataTable.Selected.Email)
You may have to change some of the identifiers.
Hi
Not sure what you mean here
I have a list of users that are being displayed in the data table
email address is text
So when a different user is selected in the grid I want to take that users email address and add it to the email address text box
So the user either enters an email address in the text box or selects a user from the table to fill it
Paul
Hi Paul,
Can you then please clarify what data type you are using? Text or Person/Group?
Also, do you want a Single or MultiSelect?
Hi @paulinuk,
I have made a quick test and it is not that hard to do with a Patch() function:
So first the user selects the row they want to update, then fill the new value and finally click the button to make the change.
The OnSelect property of the button will have to be adjusted to match your identifier names, but it does the trick for the test:
Patch(TEST,LookUp(TEST,Title=DataTable1.Selected.Title),{UserID : TextInput3.Text})
Please note this is for columns with a Text data type. If you are using a Person/Group type, you have to replace the TextInput for a PeoplePicker and adjust the Button.Onselect statement slightly to be able to handle Records.
Hi
I dont mean changing the user
I mean if there is a grid of 10 users, the first user will be selected by default
The user selects the third user, I want to update an edit box with that user's email address (Having the edit box tied to the table directly is not an option)
This box will be used for the user to either enter an email address manually or to populate it from the selected user in the data table, hence the reason for it not being possible to link the edit box to the data table directly
Paul
Hi @paulinuk ,
It is not possible to edit information in a data table, so I'm not sure how that links into the change of user you mentioned...
MS.Ragavendar
32
Rajkumar_M
16
Super User 2025 Season 1
mmbr1606
14
Super User 2025 Season 1