I have a few variables that contains a bunch of sql statements (several lines deep) that are wrapped in a here-string, these are executed like: invoke-Sqlcmd2 -Query $SQLQuery1 -ServerInstance ‘servername,4433’
What I have noticed is that when ud loads them for the 1st time, I see the following in the output ud log, and I receive a " Exception calling “Invoke” with “0” argument(s): “Exception calling “Invoke” with “0” argument(s): “Cannot index into a null array.””" on my card where I’m trying to display the data, When I re-run the dashboard the 2nd time, the variable appears to get loaded, I dont see the error in the log and the component displays the data.
Has anyone ran into this? or are doing it differently? not sure if this really belongs in the git issues page.
Error Log
20:53:42 ExecutionService Error executing endpoint script. Cannot bind argument to parameter ‘Query’ because it is an empty string.
at <ScriptBlock>, <No file>: line 3
20:53:42 ExecutionService Error executing endpoint script. Cannot index into a null array.
at <ScriptBlock>, <No file>: line 5
20:53:42 ExecutionService Error executing endpoint script. Cannot index into a null array.