Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Why Am I Getting Two Different Results From One Constant Source?

I am getting two different source results from one constant Source and can't figure out why.   I am using the following to get my source: Source = Web.Page(Web.Contents("https://webapps.MyDomain/p...
  • Anonymous's avatar
    Anonymous
    8 years ago

    Thanks again v-chuncz-msft. This seems to be working okay:

     

    let
      GetData = () => if List.Contains(Table.ColumnNames(Web.Page(Web.Contents("https://webapps.MyDomain/path/req_search.cfm?page=AP")){1}[Data]), "Details") then 
    Table.RemoveColumns(Web.Page(Web.Contents("https://webapps.MyDomain/path/req_search.cfm?page=AP")){1}[Data],{"Details"}) else @GetData(), ShowData = GetData() in ShowData
  • Anonymous's avatar
    Anonymous
    8 years ago

    v-chuncz-msft, I went back and changed my query to use try-otherwise, with the recursive function structured as below, and it worked this way too. So I'm marking your original response as a solution. Thanks yet again for your help.

     

    let
      GetData = () => try Table.RemoveColumns(Web.Page(Web.Contents("https://webapps.MyDomain/path/req_search.cfm?page=AP")){1}[Data],{"Details"}) otherwise @GetData(),
    ShowData = GetData() in ShowData