EOC pass through

Hello All,

I'm building out a ModernDashboard for EOC and while I could get the pages to link they don't use the passthrough Auth that the built in pages use. This is due to the URL that I"m having to build what I have now is

    N.OrionSite.Website + N.DetailsURL AS [Details URL],

However this will build the URL to be the SiteURL + DetailURL which doesn't pass through login. If I look at the EOC built in resources the URL they use is the externalURL/Server/SiteID/DetailsURL now I can't get the externalURL to query in due to SWQL's lack of cross join or subqueries but I can hard write it in like 

    'https://eoc.com/server' + N.DetailsURL

and that does return a value as I would expect. however anytime I add the SiteID into it to get the last part of the URL I get errors I can't figure a way around. Any help would be appreciated. The error is "Conversion failed when parsing the value eoc.cvshealth.com/.../ to data type int" this error does not occur if I drop the SiteID from the line. 

 'https://eoc.com/server' + N.DetailsURL --works

 'https://eoc.com/server' +S.SiteID + N.DetailsURL -error.