Forum Discussion

BrenoBNogueira's avatar
BrenoBNogueira
Regular Visitor
2 years ago

One or more tables references a dynamic data source

I've created a custom function bellow:

------------------------------------------

(endereco as text) =>
let
    Source = SharePoint.Tables(endereco, [Implementation=null, ApiVersion=15])
in
    Source
------------------------------------------

And them invoked this custom function in my column [UrlIntrnadeEspaçodeTrabalhodeProjeto] on my table 'Rates'. Each row from the column [UrlIntrnadeEspaçodeTrabalhodeProjeto] has a different value.

------------------------------------------
let
    Source = OData.Feed("https://deswik.sharepoint.com/sites/ProjectManagementBrazil/_api/projectdata", null, [Implementation = "2.0"]),
    Projetos_table = Source{[Name = "Projetos", Signature = "table"]}[Data],
    #"Removed Other Columns" = Table.SelectColumns(Projetos_table, {"IddeProjeto", "NomedoProjeto", "UrlIntrnadeEspaçodeTrabalhodeProjeto", "Customer"}),
    #"Reordered Columns" = Table.ReorderColumns(#"Removed Other Columns", {"Customer", "NomedoProjeto", "IddeProjeto", "UrlIntrnadeEspaçodeTrabalhodeProjeto"}),
    #"Sorted Rows" = Table.Sort(#"Reordered Columns", {{"Customer", Order.Ascending}, {"NomedoProjeto", Order.Ascending}}),
    #"Filtered Rows" = Table.SelectRows(#"Sorted Rows", each [NomedoProjeto] <> "Consulting Schedule" and [NomedoProjeto] <> "Forecast Projects" and [NomedoProjeto] <> "Itens de trabalho administrativas do quadro de horários" and [NomedoProjeto] <> "Vacation"),
  #"Invoked custom function" = Table.AddColumn(#"Filtered Rows", "Invoked custom function", each Function_Fonte_Geral([UrlIntrnadeEspaçodeTrabalhodeProjeto]))
    in
    #"Invoked custom function"

------------------------------------------
The result was the expected! Worked! However when I go save my dataflow appear the current error for me: "One or more tables references a dynamic data source"

I attached the screenshots for you can see.

 

 

 

1 Reply

  • I've tried to use RelativePath but still not working.


    ------------------------------------------

     

    (endereco as text) =>
    let
        Fonterelativa = [RelativePath = "/" & endereco],
        Source = SharePoint.Tables("https://deswik.sharepoint.com/sites/ProjectManagementBrazil" & Fonterelativa[RelativePath], [ApiVersion = 15])
    in
        Source
     
    ------------------------------------------