File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments