Is there any way with a calculated field or other function to return the current Tableau Server Site into Desktop?
Because we have two servers (Test and Production) I created a simple spreadsheet with columns Server and HTTP URL with one row in it, published as Environment Variables. In my worksheet I connect to that Environment Variable data source and drop the HTTP URL pill as a detail on the sheet. That allows you to use it in URL Actions. In test, the URL is for our test server and in Production it is changed to reflect the production URL so the link works dynamically.
I am not sure if that is your use case exactly, but I am interpreting your question as the need for environment variables in Tableau, which I think would be very useful, so we mimic that with a data source. You could imagine multiple rows in the data source and using a filter to get the row you want for your use case.