Goal: I have built a table that has action fields, 1 of which opens a webpage in a new window that currently uses a formula to figure out the URL. This works EXCEPT when a specific field in the formula has special characters.
My goal is to encode the field Title in the formula below so that it works encodes correctly and the link works.
I think you're most of the way there, I'm not entirely sure if the twitter part is in field1 or if it's hard coded, but hopefully this gives you enough of an idea to get it working with your variables.
This part just turns both parts into a text string, so ${currentRow.field1}${currentRow.field2} = "http://twitter.com/intent/tweet?text=Some tweet text"
And then the whole thing is wrapped by encodeURIComponent, so the result is "http%3A%2F%2Ftwitter.com%2Fintent%2Ftweet%3Ftext%3DSome%20tweet%20text"
I don't know if that's exactly what you want, because encodeURIComponent will encode the whole thing, including all parts of the URI syntax (https://), so you may need to try encodeURI() if this isn't working for you.