none
Table.Combine from two ODATA sources RRS feed

  • Question

  • Dear All,

    I have twoODATA sources of the same structure and I would like to load both sources with one qurey in one single table.

    My qurey currently looks like this:

    let
        Source1 = OData.Feed("https://api.businesscentral.dynamics.com/v1.0<tenant-id>/ODataV4/Company('<Company-Name>)')/General_Ledger_Entries", null, [Implementation="2.0"]),
        Source2 = OData.Feed("https://api.businesscentral.dynamics.com/v1.0/<tenant-id>/ODataV4/Company('<Company-Name>)')/General_Ledger_Entries", null, [Implementation="2.0"]),
        #"TableCombined" = Table.Combine(#"Source1", #"Source2")
    in
        #"TableCombined"

    I'm receiving the following error message:

    Expression.Error: We cannot convert a value of type Table to type List.
    Details:
        Value=Table
        Type=Type

    Can omeone tell mewhy I receive this error message?

    Thanks and best regards

    Thomas

    Friday, June 21, 2019 4:49 PM

Answers

  • Hi Thomas,

    The reason is simple. The Table.Combine function expects a list of tables for its required parameter. In your TableCombined expression, you supply a table (Source1) to Table.Combine, and not a list as expected - hence the error message.

    Your expression should be: TableCombined = Table.Combine({Source1, Source2})

    Saturday, June 22, 2019 1:14 AM

All replies

  • Hi Thomas,

    The reason is simple. The Table.Combine function expects a list of tables for its required parameter. In your TableCombined expression, you supply a table (Source1) to Table.Combine, and not a list as expected - hence the error message.

    Your expression should be: TableCombined = Table.Combine({Source1, Source2})

    Saturday, June 22, 2019 1:14 AM
  • Thanks alot Imke!!
    That was the solution!
    Cheers
    Thomas

    Sunday, June 23, 2019 3:54 PM