Forum Discussion
Scheduled Refresh Custom Function
- 7 years ago
It looks like you may be running into the issue I describe here:
Can you try rewriting so that Web.Contents uses the Query option for your parameters?
Chris
- 7 years ago
Ah, I didn't see that you are doing authentication using a header - no, I don't think it will work (see the comment by danzrust on the blog post). Sorry!
Chris
It looks like you may be running into the issue I describe here:
Can you try rewriting so that Web.Contents uses the Query option for your parameters?
Chris
- Soldexio7 years agoHelper I
Hi cwebb, Chris,
Thank you for that post and elaboration, that is amazing and I will look in this and this seems to be the solution! Do you know if this also works when you need to pass Authorization towards the URL in order to validate the URL?
Kind regards,
Dennis
- cwebb7 years agoAdvocate V
Ah, I didn't see that you are doing authentication using a header - no, I don't think it will work (see the comment by danzrust on the blog post). Sorry!
Chris
- Soldexio7 years agoHelper I
Unfornate, then I will have to wait until Custom Functions that load in Power BI desktop are supported. Hopefully it will come soon, because this would be a major reason to switch to another BI tool :) cheers!
- Oscar_Mtz_V7 years agoKudo Commander
Hi, cwebb great post, still I have a small issue, my code has two parameters, one part of the URL, the other is a query, thanks to your post I solved the second, still can“t find the right code for the first one.
Parameters are player and season.
Original code:
(Season,Player)=> let Source = Web.Page(Web.Contents("http://www.espnfc.com/player/" & Player & "?season="&Season)), Data3 = Source{3}[Data], #"Changed Type" = Table.TransformColumnTypes(Data3,{{"Team", type text}, {"Oppo", type text}, {"Date", type date}, {"Comp", type text}, {"Res", type text}, {"Appear", type text}, {"g", Int64.Type}, {"a", Int64.Type}, {"sh", Int64.Type}, {"sg", Int64.Type}, {"fc", Int64.Type}, {"fs", Int64.Type}, {"yc", Int64.Type}, {"rc", Int64.Type}}) in #"Changed Type"New code:
"Season" parameter is working, "Player" is the one I'm having the problem with, can't find the right code.
(Season,Player)=> let Source = Web.Page(Web.Contents("http://www.espnfc.com/player/" & Player, [Query=[season=Season]] )), Data3 = Source{3}[Data], #"Changed Type" = Table.TransformColumnTypes(Data3,{{"Team", type text}, {"Oppo", type text}, {"Date", type date}, {"Comp", type text}, {"Res", type text}, {"Appear", type text}, {"g", Int64.Type}, {"a", Int64.Type}, {"sh", Int64.Type}, {"sg", Int64.Type}, {"fc", Int64.Type}, {"fs", Int64.Type}, {"yc", Int64.Type}, {"rc", Int64.Type}}) in #"Changed Type"Your support is appreciated.
Regards,
Oscar