Skip to content

Commit 44b6f7c

Browse files
committed
set key names to lowercase
1 parent 72227e0 commit 44b6f7c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ServiceNow/Public/New-ServiceNowQuery.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ function New-ServiceNowQuery{
44
# Machine name of the field to order by
55
[parameter(mandatory=$false)]
66
[string]$OrderBy='opened_at',
7-
7+
88
# Direction of ordering (Desc/Asc)
99
[parameter(mandatory=$false)]
1010
[ValidateSet("Desc", "Asc")]
1111
[string]$OrderDirection='Desc',
12-
12+
1313
# Hashtable containing machine field names and values returned must match exactly (will be combined with AND)
1414
[parameter(mandatory=$false)]
1515
[hashtable]$MatchExact,
@@ -30,14 +30,14 @@ function New-ServiceNowQuery{
3030
# Build the exact matches into the query
3131
if($MatchExact){
3232
foreach($Field in $MatchExact.keys){
33-
$Query += "^$Field="+$MatchExact.$Field
33+
$Query += "^{0}={1}" -f $Field.ToString().ToLower(), ($MatchExact.$Field)
3434
}
3535
}
3636

3737
# Add the values which given fields should contain
3838
if($MatchContains){
3939
foreach($Field in $MatchContains.keys){
40-
$Query += "^$($Field)LIKE"+$MatchContains.$Field
40+
$Query += "^{0}LIKE{1}" -f $Field.ToString().ToLower(), ($MatchContains.$Field)
4141
}
4242
}
4343

0 commit comments

Comments
 (0)