web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Detect when selected r...
Power Apps
Answered

Detect when selected row in a data table is changed

(0) ShareShare
ReportReport
Posted on by 260

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

Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,638 Super User 2026 Season 1 on at

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

  • paulinuk Profile Picture
    260 on at

    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

  • BCBuizer Profile Picture
    22,638 Super User 2026 Season 1 on at

    Hi @paulinuk,

     

    I have made a quick test and it is not that hard to do with a Patch() function:

     

    BCBuizer_0-1648824814716.png

     

    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.

  • paulinuk Profile Picture
    260 on at
    Hi 
     
    I don’t want the user having to click a button 
     
    Is there a solution that would avoid this?
     
    im not using this to update the data
     
    This is an email page so the user is clicking on the row for the user they want to email
     
    Cheers
     
    Paul 
  • BCBuizer Profile Picture
    22,638 Super User 2026 Season 1 on at

    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?

     

  • paulinuk Profile Picture
    260 on at

    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

  • Verified answer
    BCBuizer Profile Picture
    22,638 Super User 2026 Season 1 on at

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard