Forum Discussion

ercwebdev's avatar
ercwebdev
Frequent Visitor
6 years ago
Solved

URL escaping to get PWA subsites

Hi all, I'm struggling with a quirky little problem in Power BI that is causing a big problem. I came across this tutorial (which uses Power M Query) to access many subsites in SharePoint and return...
  • Sergiy's avatar
    6 years ago

    ercwebdev ,

    Hi Alan,

     

    Try this code:

    let
        Source = "https://mysitename.sharepoint.com/sites/pwa/project  -  name",
        uriPartsRecord = Uri.Parts(Source),
        result = uriPartsRecord[Scheme] & "://" & uriPartsRecord[Host] & uriPartsRecord[Path]
    in
        result

     

    the result I get is

    https://mysitename.sharepoint.com/sites/pwa/project%20%20-%20%20name

     

    Does it help?