Forum Discussion
Create a dynamic value for Json.Document function
- 3 years ago
Welcome to the wonderful world of the formula firewall. Happy reading.
Behind the scenes of the Data Privacy Firewall - Power Query | Microsoft Docs
Inline your queries if possible.
Hi,
thanks for your recommandation.
After reading the Query option for the Web.Contents(), I used the web.contents like below:
= Json.Document(
Web.Contents(
"https://url.com/site/222222",
[
RelativePath="energyDetails",
Query=
[
grid="XXX",
startTime=DateTime.ToText(#"Site Data - Start and End Date"[dataPeriod.startDate]),
endTime="2022-08-29 13:00:00",
api_key="xxx"
]
]
)
)the options "startTime" and "endTime" are from another table "Site Data - Start and End Date" which contains two columns:
- dataPeriod.startDate
- dataPeriod.endDate
I got the the problem below when i'm executing the code above:
What's wrong with the startTime value ? how can I fix that ?
Thanks in advance for the help
Regards,
- lbendlin3 years agoSuper User
startTime=DateTime.ToText(#"Site Data - Start and End Date"[dataPeriod.startDate]){0}- Anonymous3 years agoNot applicable
Thanks lbendlin for your feedback.
I still have the same error message after adding "{0}":
startTime=DateTime.ToText(#"Site Data - Start and End Date"[dataPeriod.startDate]){0}I tried to added inside the DateTime.ToText() function and I got the error message as below :
startTime=DateTime.ToText(#"Site Data - Start and End Date"[dataPeriod.startDate]{0})Any help ?
- lbendlin3 years agoSuper User
Welcome to the wonderful world of the formula firewall. Happy reading.
Behind the scenes of the Data Privacy Firewall - Power Query | Microsoft Docs
Inline your queries if possible.