Forum Discussion

RafDelgado's avatar
RafDelgado
Helper II
10 years ago
Solved

Invoked Function Name in BI Desktop Queries

Hi All,   Does anyone know if you can specify the name of the invoked function when executing it?   At the minute, I have a couple of functions which are called Configuration and Servers. When in...
  • ImkeF's avatar
    ImkeF
    10 years ago

    Hi Raf,

    I think we're on the same page here - just that I didn't make myself clear enough :-)

     

    Instead of using a function for creating the multiple webcalls with different page numbers, create a table with those parameters instead: manually, or like this #table({"URL", "PageNumber"},{{"yourURL", 100}, {"yourURL", 200}}) or dynamically with List.Generate or so.

     

    Then you add a custom column where you invoke your function (with those 2 (or more) parameters from your columns passed into):

    myWebCallFunction([URL], [PageNumber])

     

    Check out this post: http://exceleratorbi.com.au/power-query-combine-web-pages/

    There Matt first creates the function (which you probably have already) and then from 1:20 onwards first creates his parameter table (which just contains a list of different years) and then invokes his (1) function from within a calculated column.

     

    Edit: So your page numbers will be like Matt's Year numbers.

     

    BTW: You can use List.Generate for an iterative calling of your web-pages where it checks with each call if there is more content to come and then perform the next step if yes or stop if no. Had that somewhere in the TechNet-forum but cannot remember any more. But maybe Chris' article will tell you all you need already: https://blog.crossjoin.co.uk/2014/06/25/using-list-generate-to-make-multiple-replacements-of-words-in-text-in-power-query/