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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Modern Table OnSelect ...
Power Apps
Unanswered

Modern Table OnSelect function is being triggered incorrectly

(1) ShareShare
ReportReport
Posted on by 34

I have a modern table with an edit form being visible when a record is selected within the table. Since ThisItem is not available in a table OnSelect property, I am capturing the Record Title by referencing the Table.Selected.Title and then using another variable to display the form which is using the Title to lookup the record.

Set(
 VarSelectedProjectPC,
 'Project PC Table'.Selected.Title
);
Set(
 VarUpdateProjectPC,
 true
)

 

I have found that any refreshes to the dataset (the same applies to a ClearCollect if I add the dataset to a collection) causes the OnSelect property to trigger. However, it will only trigger the 'Set(VarUpdateProjectPC,true)' because is no particular record being selected - the 'VarSelectedProjectPC' variable remains blank.

I originally had the same function with a classic table but this was crashing my app when scrolling horizontally.

 

Has anyone encountered this at all and perhaps knows of a workaround?

 

Thanks in advance.

Categories:
I have the same question (0)
  • TonyDew Profile Picture
    49 on at

    I can't help you with a solution, but I can confirm your experience.

     

    The OnSelect seem to fire on page load, or when you sort columns, etc. When it misfires, there is no selected info either.

  • stanmiller95 Profile Picture
    34 on at

    Thank you for the confirmation, I'm glad it wasn't just something I was doing. I have replaced the table with a gallery for now but I would like to see this issue resolved - especially because the classic table is broken completely.

  • TonyDew Profile Picture
    49 on at

    ! I have had some success, and my work around was corroborated in a Reddit post comment from someone on the Power Apps Interface Group.

     

    Essentially, check to make sure Selected is no blank or has at least one item in it, roughly like:

     

    If(Not(IsBlank('Your Table'.Selected)),**** DO YOUR THING HERE****)

     

    If it is a "misfire" "your thing" won't run, but if it is a legit click, it will.

     

    https://www.reddit.com/r/PowerApps/comments/1bd8q6h/comment/kupi09o/?utm_source=share&utm_medium=web2x&context=3

  • stanmiller95 Profile Picture
    34 on at

    Ah this is a good suggestion!

    My only issue with this is that I have a refresh button and it is entirely plausible that a row is selected when this refresh button is pressed. This would at least eliminate triggering on screen navigation which is some of the way to solving my problem.

  • Verified answer
    TonyDew Profile Picture
    49 on at

    @stanmiller95 wrote:

    ...it is entirely plausible that a row is selected when this refresh button is pressed.

    If(Not(IsBlank('Project PC Table'.Selected)),
     Set(
     VarSelectedProjectPC,
     'Project PC Table'.Selected.Title
     )
    );
    Set(
     VarUpdateProjectPC,
     true
    )

     

    This will only set VarSelectedProjectPC if a Table row is actually selected. It won't re-set VarSelectedProjectPC if the Table glitches.

  • GT-05111229-0 Profile Picture
    39 on at
    I am not sure if its worth posting a new question but i have very similar issue
     
    I set a varTRORecord on a page and then it seems that it gets stuck on that record and jumps to the next screen
     
    I added this on the Onselect for ieScreen1 but it seems it keeps jumping to the Navigate part, without letting me choose another line. It totally slips Screen1
    If(Not(IsBlank(TROA1dataTble_1.Selected)),Set(varTRORecord,TROA1dataTble_1.Selected));
    Set(varUpdateTRORecord,true);
    Navigate(ScrnTRODashboard)
     
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard