Forum Discussion
aammontecas
4 years agoNew Member
Convert name to id for use in m query
Hello, I am using Query Parameters to format a call to an API to return data for a given trackingId. I have a table with userName, trackingId. I want to call an API to populate a new table, the i...
aammontecas
4 years agoNew Member
I have created the lookup table called device containing alias(name), mac(id), and the list of alias called l_device_username, using that query I created a parameter trackingUser.
I added this to the query
#"device" = {[alias=#"trackingUser"]}[mac],
Source = Json.Document(Web.Contents("https://apibaseurl" & "/application?trackingId=" & Uri.EscapeDataString(#"device") & "&startTime=" & Uri.EscapeDataString(startTime) & "&endTime=" & Uri.EscapeDataString(endTime), [Headers=[#"Content-Type"="application/json", #"Api-Key"="*"]])),
content = Source[content],
But get this error:
Expression.Error: We cannot apply field access to the type List.
Details:
Value=[List]
Key=mac