You don't need any recordID.
If these buttons are in the portal row, then at the moment of clicking either one you are “on” that related record and can use e.g. a single step
Set Field [ Media::type ; "Personal” ], or
Set Field [ Media::type ; "Public” ]
depending on the button. (Or use a script with different script parameters).
If you use Conditional Formatting to colour the appropriate button, you don't even have to display the type field itself.
(Field here displayed only for demo purposes.)
Thank you very much.
The thing I don't understand is that it's exactly the way I did it at first but as it wasn't working then I tried differently. I probably forgot something. Anyway, due to your help it works fine now.