Forum Discussion
Web.Contents with dynamic file URL
- 6 years ago
I've got it working. All ive done is set all URL's as parameters, I also added a space between parameters and the & in the functions. All minor stuff so this makes me think there is more to it.
Anyway I uploaded it to my service updated the facebook file and refreshed and the clicks updated.
I've updated the pbix with your sharepoint path, here are the files again.
I've got it working. All ive done is set all URL's as parameters, I also added a space between parameters and the & in the functions. All minor stuff so this makes me think there is more to it.
Anyway I uploaded it to my service updated the facebook file and refreshed and the clicks updated.
I've updated the pbix with your sharepoint path, here are the files again.
Hello aTChris,
Thank you first of all for taking the time to solve my problem. 🙂
Just checked what you did. You have made fileName as parameter. In the sample there are 2 media sources, so you created 2 new parameters for each, this will make the value of parameter in double quotes, and that is why it works. In other words, file names are static.
However, in reality, sometimes there can be more than 10 or even 20 different vendors. With your method I will need to create more parameters.
With my original code in Consolidated Media Raw Data, you will see there is a column called "Folder Path" at the step of Invoke Custom Function. When invoking processors, I will pass folder path + file name (_[Folder Path] & _[Name]) to processors. This way, I do not need to create that many parameters.
Record.Field(processorRecord, _[Custom Function])(_[Folder Path] & _[Name], _[Publisher])
However, if I do this, it will not work in BI Service...
Moreover, sample is a simpler version of what I am doing. Besides media vendors, client and media campaign are both dynamic as well (that's why I have ClientFilter and CampaignFilter as parameters as well). If there are 4 clients, 4 vendors and 4 campaigns, I will need to create 4 * 4 * 4 = 64 new parameters because their paths will be all different...
Therefore, I want to make it as dynamically as possible, that's why I am passing file name with relative path dynamically to processors instead of hard-code it.
I am so sorry to tell you that your method would not work for me... I really wish I could use static URL but I cannot due to too many sources...
Any other thoughts? >_<