Forum Discussion
OData error calling function when identical table works fine
- 7 years ago
Hi Anonymous ,
let
Source = OData.Feed("https://MYIP/odata", null, [Implementation="2.0"]),
#"Top_function (NumberToReturn as number) as table" = Source{[Name="Top",Signature="function (NumberToReturn as number) as table"]},
Data = #"Top_function (NumberToReturn as number) as table"[Data],
#"Invoked FunctionData" = Data(1)
in
#"Invoked FunctionData"By my test step by step, I'm afraid that the error may caused by the #"Top_function (NumberToReturn as number) as table" and Data(1).
You could try the query below.
let Source = OData.Feed("http://services.odata.org/V3/Northwind/Northwind.svc/", null, [Implementation="2.0"]), #"Employees table" = Source{[Name="Employees",Signature="table"]}, #"Data" = #"Employees table" [Data], #"Invoked FunctionData" = #"Data"{1} in #"Invoked FunctionData"Best Regards,
Cherry
Hi Anonymous ,
let
Source = OData.Feed("https://MYIP/odata", null, [Implementation="2.0"]),
#"Top_function (NumberToReturn as number) as table" = Source{[Name="Top",Signature="function (NumberToReturn as number) as table"]},
Data = #"Top_function (NumberToReturn as number) as table"[Data],
#"Invoked FunctionData" = Data(1)
in
#"Invoked FunctionData"
By my test step by step, I'm afraid that the error may caused by the #"Top_function (NumberToReturn as number) as table" and Data(1).
You could try the query below.
let
Source = OData.Feed("http://services.odata.org/V3/Northwind/Northwind.svc/", null, [Implementation="2.0"]),
#"Employees table" = Source{[Name="Employees",Signature="table"]},
#"Data" = #"Employees table" [Data],
#"Invoked FunctionData" = #"Data"{1}
in
#"Invoked FunctionData"
Best Regards,
Cherry