Forum Discussion
Calling a function and function name is in a data row
- 6 years ago
I think I understand what your trying to do now... Don't use Expression.Evaluate, it will just make your life harder. Instead use something like:
Record.Field(Output, [Processor])([Folder Path] & [Name], [Publisher]) - 6 years ago
Oh I see what is missing...
Change:
GoogleGSMDailyProcessor = (fileName as text, publisherName as text) => GoogleGSMDailyProcessor,to
GoogleGSMDailyProcessor = (fileName as text, publisherName as text) => GoogleGSMDailyProcessor(fileName, publisherName),Also, if you hit the firewall issue in the online service, go to edit credentialls (for the dataset object, not the report itself) and set "Privacy level setting for this data source" to None
This is a commonly known issue. Usually, it can be cured by brunching you code. Right-click on the step in the editor and select Extract previous. In you scenario you may need to brunch from a couple of steps before #Invoke. At the point where you define the var_Shared. The main idea is to separate the source of external data from processing with internal data.
As to the list in Excel - this is a good idea. But just as simple you can create a table directly in PBI vis Enter Data. If you keep your functions separately - you always can count-reconcile it.
Another alternative is defining a single function which is called in the main code. You pass the actual name to this function and it decides through if-then or table-filter which function to call. In this case evaluation o ly need to know the name-reference to this wrapper function. It does not need to know that other function even exist.
Kind regards
JB
Hello jborro,
I just did what you said, Extract Previous at "var_Shared = #shared" step. However, same error still occurs at #Invoke step.
Formula.Firewall: Query 'GenerateOutput' (step 'Invoked Custom Function') references other queries or steps, so it may not directly access a data source. Please rebuild this data combination.
I defined var_Shared in the very beginning of my advance editor, so when I did extract previous, new query is very short. And my #Invoke step is exactly the same as what you wrote previously.
I just added a table via Enter Data. And I want to manually generate a record like the screenshot below. Is there a way to turn this table into such record? Screenshot is done with #shared, and I am trying to avoid using #shared.
Image 1, table I manually added:
Image 2, hoping to turn the above table to this...
I think there is something to do with name=name, but I can't figure out where to put it... (T_T)
Thank you so much in advance.