Forum Discussion
We cannot apply field access to the type List.
- 6 years ago
In this case, it looks like it is trying to extract a list when it already got one. In that case try removing the final step in that function:
GetPage = (Index) => let Skip = "offset=" & Text.From(Index * EntitiesPerPage), Top = "?count=" & Text.From(EntitiesPerPage), Url = BaseUrl & Top & "&" & Skip, Json = GetJsonList(Url) in Json,if that doesn't work due to the file having both forms try:
GetPage = (Index) => let Skip = "offset=" & Text.From(Index * EntitiesPerPage), Top = "?count=" & Text.From(EntitiesPerPage), Url = BaseUrl & Top & "&" & Skip, Json = GetJsonList(Url), Value = if Json is record then Json[#"value"] else else Json in Value,
I don't know what your dataset is like, so the error cound be in many places.
In the error message you should see:
Value=[List]
Key=****
the **** is an indicator where the error is. Somewhere in your source should be [****], if it isn't there and key is "count" then it is on the line with
Record.Field(#"Temp"[meta],"count")
The error message basicly means:
You tried to get the column of a table/row, but instead you gave us a column/collection.
Hi Artemus,
The error is:
We cannot apply field access to the type List.
Details:
Value=[List]
Key=value
So I guess it's in this part:
GetPage = (Index) =>
let
Skip = "offset=" & Text.From(Index * EntitiesPerPage),
Top = "?count=" & Text.From(EntitiesPerPage),
Url = BaseUrl & Top & "&" & Skip,
Json = GetJsonList(Url),
Value = Json[#"value"]
in Value,The error must lie?
How can I fix it :S?
- artemus6 years ago
Microsoft Employee
In this case, it looks like it is trying to extract a list when it already got one. In that case try removing the final step in that function:
GetPage = (Index) => let Skip = "offset=" & Text.From(Index * EntitiesPerPage), Top = "?count=" & Text.From(EntitiesPerPage), Url = BaseUrl & Top & "&" & Skip, Json = GetJsonList(Url) in Json,if that doesn't work due to the file having both forms try:
GetPage = (Index) => let Skip = "offset=" & Text.From(Index * EntitiesPerPage), Top = "?count=" & Text.From(EntitiesPerPage), Url = BaseUrl & Top & "&" & Skip, Json = GetJsonList(Url), Value = if Json is record then Json[#"value"] else else Json in Value,- Shamatix6 years ago
Post Partisan
Hi Artemus,
Thanks a ton for the solution!
However I have another major issue now:S
By chance you have skype and I can try descibe my issue there?
I am getting this:There were too many elements in the enumeration to complete the operation.
Best regards