Forum Discussion

AlekseiKomarov's avatar
AlekseiKomarov
Regular Visitor
3 years ago

Extracting data from Scoro

Hey! I have a problem with extracting data from Scoro. There is a modul with ca 200 fields 180 of which is additional fields and the rest is original fields. The code below extracts only original fields. Does anyone know how to get all data stored in modul? Thank you!

 

let
Source = (MODULE) => let
GetData = Table.FromList(List.Skip(List.Generate( () => [Table = #table({}, {{}}) ,Page = 1, Counter=0], // Start Value
each Table.RowCount([Table])>0 or [Counter]=0, // Condition under which the next execution will happen
each [
WebCall = Json.Document(Web.Contents("https://---.scoro.ee/api/v2/",[
Headers = [#"Content-Type"="application/json"],
RelativePath=(MODULE)&"/list",

Content=Text.ToBinary("{""apiKey"":""---"",""company_account_id"":""---"",

""lang"":""eng"", ""per_page"":""100"", ""detailed_response"": true, ""page"":" &Number.ToText([Page])& "}")
])),
Page = [Page]+1,
Counter = [Counter]+1,// internal counter
Table = Table.FromRecords(WebCall[data]) // steps of your further query
]
,each [Table]
) ,1), Splitter.SplitByNothing(), null, null, ExtraValues.Error)
in

GetData
in
Source

 

 

No RepliesBe the first to reply