Hiding objects based on related field in portal
So I drew a shape which I turned into a button on my layout. When it's clicked it adds a value into a related table which is visible on a portal. Based on whether or not there is a value in that related field, I would like to hide the button.
Right now my calculation to hide the button looks like this
Simple enough but it seems to be looking at the first related record in the related table instead of the last record in the related table. On the portal I have it sorted so the latest record is the first portal row.
How can I make my calculation either look at the last related record or look at that first portal row.