Category: How do I do X?
Updated

This solution is summarized from an archived support forum post. This information may have changed. If you notice an error, please let us know in Discord.

Can not auto select a row within a table from using button widget

Issue

I'm having an issue with my app where clicking the sign out button selects the wrong row and signs out the wrong user. I need the sign out button to select the row it's in and only sign out that user, but I'm new to JS and not sure how to fix it. I shared a video with the support team, but couldn't share it here. They suggested using Table1.triggeredRow instead of Table1.selectedRow.

Resolution

The user was having issues with a table that updates with new visitors that sign in and wanted to ensure that the sign-out button selected the row it was in and only signed out that user, rather than signing out the previously selected user. The support team suggested using the triggeredRow property of the Table widget instead of the selectedRow property. The selectedRow property fetches the data of the selected row of the table, while the triggeredRow property fetches the data of the row where the button was clicked. By using the triggeredRow property, the sign-out button will select the correct row and only sign out the user in that row. The team also provided a link to more information on the properties of the Table widget.