Hint: Get ( ActivePortalRowNumber ) will be empty when no row is selected.
Clicking a portal row by itself is nothing that you can detect.
Either add an invisible button underneath the fields, or add a fake ”selection check box“, where I would suggest that you actually write the portal table ID into a global variable (that should be record-specific) and read that variable as a condition to let your “action” buttons appear.
The variable approach a) allows you to process multiple records, e.g. for deletion, and b) is multi-user safe.
You could use an "On enter" script trigger on the portal. Every time a user clicks on or changes to a different row in the portal this trigger will fire. In the script you could update some value that determines visibility of the buttons you want to hide/show (you may have to do a refresh screen/object depending on how you implement this).
That's the way to do it! I was trying to work it out in my mind. ActivePortalRowNumber doesn't seem to help in this case. We only want the button on the row you're on to be active.
Thanks for jogging my mind about how to do it! (said a person who didn't ask the question but was trying to think through it!)