Skip to content

Commit e2cc05b

Browse files
OrderBy and OrderDirection should not be mandatory
I would suggest combining "Default values" (ie $OrderBy='opened_at') with the parameter as not mandatory. Alternatively use mandatory without a "Default value".
1 parent 10945dc commit e2cc05b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

PSServiceNow.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ function New-ServiceNowQuery{
1010

1111
param(
1212
# Machine name of the field to order by
13-
[parameter(mandatory=$true)]
13+
[parameter(mandatory=$false)]
1414
[string]$OrderBy='opened_at',
1515

1616
# Direction of ordering (Desc/Asc)
17-
[parameter(mandatory=$true)]
17+
[parameter(mandatory=$false)]
1818
[ValidateSet("Desc", "Asc")]
1919
[string]$OrderDirection='Desc',
2020

0 commit comments

Comments
 (0)