Forum Discussion
Gabe_V
2 years agoHelper I
Receiving errors when trying to pass and evaluate fields between functions
Hi folks, Hoping someone can help me because I'm stumped (and also kind of a newbie). I have made a custom function, and need to reference it from my main query, passing in each record and a spe...
ImkeF
2 years agoCommunity Champion
Hi Gabe_V ,
yes, you would have to add a check if the table is empty to return a boolean here:
let
#"Output Test" = (r,c) =>
if Table.RowCount(Table.SelectRows(
Table.FromRecords(r),
each c = Text.Contains(Record.Field(r, c),"(SMT)")
))>0 then true else false
in
#"Output Test"
Not completely sure, but maybe this would also work? (as there is only 1 record to examine):
Text.Contains(Record.Field(r, c),"(SMT)")
Gabe_V
2 years agoHelper I
Hi ImkeF, Unfortunately, when I make those changes, I still get an error: "We cannot convert a value of type List to type Record". I thought "ok, I'll just take the curly braces off the function call so its not a list anymore". However, that produced the error: "We cannot convert the value null to type Text"