Forum Discussion
For-Loop
Hey amitchandak
thanks for your fast answer. I think it is not going to help because there is one query which get divided into smaller queries, if i get it right.
We need a loop for replacing some part of the url, then trigger again, then replacing etc.
Do you think this would work too?
let
Source = Json.Document(Web.Contents("https://api.XXXXX.com/api/v2/employees/" & employeeId & "/timetracking", [Headers=[Authorization = Authentification]])),
data = Source[data],
#"Converted to Table" = Table.FromList(data, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"id", "employeeId", "projectId", "requestDate", "startTime", "endTime", "totalTimeInMinutes", "breakTimeInMinutes", "comment", "status", "categories"}, {"Column1.id", "Column1.employeeId", "Column1.projectId", "Column1.requestDate", "Column1.startTime", "Column1.endTime", "Column1.totalTimeInMinutes", "Column1.breakTimeInMinutes", "Column1.comment", "Column1.status", "Column1.categories"})
in
#"Expanded Column1"
See the example and highlighted part. And we want to get the data for all employees in one query by replacing the employeeID again and again...
Thanks
Finn