@tim.young Well after a lot of playing around and three days later on and off, I got method one above working (as per the original post).
I had originally copied the ensureLeft(‘https:’) from the linked post and pasted it in and always got an error.
Actually typing in ensureLeft(‘https:’) worked. The only difference is the proper use of single quote versus apostrophe . This forum software seems to convert single quotes to apostrophe so I can see the difference now as a I type but on the preview window it has converted the single quote to apostrophe. 3 days later I figured this out and learned alot about API’s along the way. You go to just love computers