Forum Discussion
dahya_mistry
1 year agoFrequent Visitor
How to Refer to Tables and Table Name Variables in Custom Functions
I'm struggling with referencing Tables (as type table) and Tablenames (as type text) in a Custom Function. I have the following (part of a function) where the bolden items need to refer to the Table ...
dahya_mistry
1 year agoFrequent Visitor
When I do the following simple PQ script:
(DatasetName as table, IDToReplace, RandomDataTableName as text, RandomDataIDColumn as text ) =>
let
RandomTableSource = List.First(Table.SelectRows(Record.ToTable(#sections[Section1]), each [Name] = RandomDataTableName)[Value]),
in
RandomTableSource
I still get an error as below, with the data showing the invoked function:
It's saying that the Person ID doesn't exist in the rowset, but yet I can clearly see that it does in the invoked function table !!!