Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Dear Users,
I am facing an issue in converting the data into correct format to display as sheets in navigation table.
In below code, I have defined two functions:
Function 1 - FetchQueueInfo - This fetches the list of queue ids
Function 2 - FetchQueueDetail - This fetches the details for an individual queue
Now, in order to display each 'queue id' details as a separate table, I am required to iterate over the table and fetch the necessary details and convert it into list in {"name", "data"} format. However, when I am calling below function, I am getting an error - "We cannot convert a value of type Function to type List".
// This file contains your Data Connector logic
section AA;
[DataSource.Kind="AA", Publish="AA.Publish"]
shared AA.Contents = () as table =>
let
token = FetchToken(),
queueInfo = FetchQueueInfo(token),
source = #table({"Name", "Data"}, {
each {[queueInfo.description], FetchQueueDetail(token, [queueInfo.id])}
}),
navTable = Table.ToNavigationTable(source, {"Name"}, "Name", "Data", "ItemKind", "ItemName", "IsLeaf")
in
navTable;
Kindly assist with this query.
Hi @amitbanwar ,
Did you try to extract the FetchQueueDetail(token, [queueInfo.id]) out as a variable?
Best Regards,
Eyelyn Qin
Did you forget to specify the return type for FetchQueueDetail() ?