I have a function that receives an array of values as a parameter, all those values it's supposed that be strings.
let SelectedValues = dynamic(["2022-08-14T13:05:17Z", "EconChgOvrDiff", "1"]);
let F = (SelectedValues:dynamic=dynamic([]), Limit:int=100)
{
MyTable
| where Value in (SelectedValues)
| limit Limit
}
;
F(SelectedValues)
The problem is that it seems like ADX is inferring the type of my strings that are a representation of a timestamp and ADX is converting those strings into an actual timestamp and therefore my query does not return the expected result.
you can see in the images below how ADX is modifying my value


and I know that I can do the following and it works as expected, but I do really need to have that query into a function and be able to receive those values as parameters of the function.
MyTable
| where Value in ("2022-08-14T13:05:17Z", "EconChgOvrDiff", "1")
| limit 100
Thanks in advance!
I tried the same in my environment and I got same result. This might be the default nature in ADX when using dynamic arrays.
To avoid this, wrap your datetime string in single quotes(
'') like below.Now, it is taking it as string data type.