Closed aburnsy closed 10 months ago
Should be able to fix this with a change to the condition check, I'll update it to the following so it gets set if the parameter is specified and regardless of the value:
if ($PSBoundParameters.ContainsKey('StandardReload')) {
$engine.settings.standardReload = $StandardReload
}
Even better Adam, thanks.
On Thu 16 Feb 2023, 4:20 PM Adam Haydon, @.***> wrote:
Should be able to fix this with a change to the condition check, I'll update it to the following so it gets set if the parameter is specified and regardless of the value:
if ($PSBoundParameters.ContainsKey('StandardReload')) { $engine.settings.standardReload = $StandardReload }
— Reply to this email directly, view it on GitHub https://github.com/ahaydon/Qlik-Cli-Windows/issues/199#issuecomment-1433349361, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADLHQQHFEXQGXASC4DN3MKTWXZHTPANCNFSM6AAAAAAU6BRLPQ . You are receiving this because you authored the thread.Message ID: @.***>
$standardReload parameter is a boolean if disabling StandardReload, we have to pass -standardReload $False However, we only set the $engine.settings.standardReload = $standardReload after testing if($standardReload) This will never be set when $standardReload = $False
Could I suggest that we make use of 2 switch statements instead?