Hello,
I have a simple function that takes a value and attempts to find its name (identifier) by looking it up in #shared.
let
Lookup = (value) =>
Table.SelectRows(Record.ToTable(#shared), each [Value] = value),
FoundEntry = Lookup(Text.AfterDelimiter) // the argument here is the function whose name we're trying to find
in
// FindEntry // works fine
// Table.FirstValue(FoundEntry) // raises 'Expression.Error: A cyclic reference was encountered during evaluation.' - why?
FoundEntry{0} // raises 'Expression.Error: A cyclic reference was encountered during evaluation.' - why?
Using the input value to filter #shared (converted to a table) down to the corresponding row works fine. However, attempting to select the first row (FoundEntry{0}) or first value (Table.FirstRow(FoundEntry) from this table results in an "Expression.Error: A cyclic reference was encountered during evaluation" being raised.
This seems strange, as limiting the output returned to just the first row or first value doesn't seem to introduce anything obviously cyclic.
Any idea what's going on here?
Thanks,
Ben