I defined a UDF function in kusto:
.create-or-alter function with (docstring = 'abc', folder='udfs')
get_index_of(input:string, lookup:string)
{
countof(input, lookup)
}
Next, I am going to use it an a sample table and it does not work
datatable (Input:string, Lookup:string)
[
"text:1", ":"
]
| extend Result = get_index_of(Input, Lookup)
I get the error message:
countof(): failed to cast argument 2 to scalar constant
Do you have any idea what is wrong? Please note, that the function works, because a sample run return result:
print get_index_of('text', 'e')
1