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 / DataTable ThisItem not...
Power Apps
Answered

DataTable ThisItem not available for OnSelect

(0) ShareShare
ReportReport
Posted on by 75

I have a DataTable that I am attempting use a hyperlink and let a user navigate to a record. To do that I set IsHyperlink = true. Then, I would like to on that same field use the "Launch" command with current record ID. I end up with something like this:

 

OnSelect = Launch("Http://MyUrl.com...&id=" & ThisItem.ID)

 

However, the ThisItem throws an error "Name isn't valid. This identifier isn't recognized." However, the Text=ThisItem.UserDisplayName works perfectly fine. I have also tried to set a variable OnClick for testing purposes and get a similar error message.

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

    Hi @PattersonCA1 ,

     

    Please check the syntax for the Launch() function:

     

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-param#syntax

     

    Your formula will look something like the below

    OnSelect = Launch("Http://MyUrl.com", "id", ThisItem.ID)

    Which should result in a new window or tab opened with the below URL:

    http://myurl.com&id=X
  • PattersonCA1 Profile Picture
    75 on at

    I looked at this just now. While I can definitely change it the way you specified, it does not solve the original issue unfortunately that ThisItem is still not available for use. Typing in exactly what you did still gives me the error "Name isn't valid. This identifier isn't recognized."

     

    If I swap over to the "Text" item and copy paste ThisItem.ID, it displays the ID in the column, so I know there aren't any typos in it.

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

    Hi @PattersonCA1 ,

     

    I have used this exact code which working:

     

    OnSelect = Launch("Http://MyUrl.com", "id", ThisItem.ID)

     

    Only if I type the name of a column that doesn't exits, I get the same error:

     

    BCBuizer_0-1646407937809.png

    Can you remove the "ID" after "ThisItem." and see what options PowerApps suggests? Like in the picture above, it suggests me to use "ID".

  • PattersonCA1 Profile Picture
    75 on at

    I can't get it to even get that far. It gives me the error on ThisItem. Not on the second half. It gives me no suggestions:

     

    ThisItemError.png

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

    Hi @PattersonCA1 ,

     

    What is the control you are setting the OnSelect property for? In my case it is a gallery and I assumed it was the same for you, but now I'm not sure.

  • PattersonCA1 Profile Picture
    75 on at

    It's a DataTable.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @PattersonCA1 

    DataTables do not have an internal ThisItem property!  The datatable itself does not have an OnSelect action - only the columns in the datatable.  And since it is a column, the concept of ThisItem is not applicable. 

    If you want that level of functionality, I would consider moving to a Gallery rather than a DataTable control.

     

    I hope this is helpful for you.

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

    Hi @PattersonCA1

     

    There's the issue then. You can't select individual records in a DataTable, just columns. I was just looking to see if I can add a column to my dataset that is populated with a URL, but I can't get that to work just yet:

     

    BCBuizer_0-1646410435748.png

     For the DataTable, Items = colTest

  • PattersonCA1 Profile Picture
    75 on at

    Hey Randy -- I should have been more specific in that I am doing it within a column, not the DataTable as a whole. I don't see how it's not applicable on the "OnSelect" when the "Text" value of the column is using the ThisItem property as its default setting.

  • PattersonCA1 Profile Picture
    75 on at

    I will look at transitioning this to a gallery as Randy suggested.

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 505

#2
WarrenBelz Profile Picture

WarrenBelz 502 Most Valuable Professional

#3
Haque Profile Picture

Haque 324

Last 30 days Overall leaderboard