Skip to content

Commit 17a6fd1

Browse files
committed
add - options for operators
1 parent 3aea381 commit 17a6fd1

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

ServiceNow/Public/New-ServiceNowQuery.ps1

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,15 @@ function New-ServiceNowQuery {
125125
# should be a join
126126

127127
switch ($thisFilter[0]) {
128-
'and' {
128+
{ $_ -in 'and', '-and' } {
129129
'^'
130130
}
131131

132-
'or' {
132+
{ $_ -in 'or', '-or' } {
133133
'^OR'
134134
}
135135

136-
'group' {
136+
{ $_ -in 'group', '-group' } {
137137
'^NQ'
138138
}
139139

@@ -237,7 +237,8 @@ function New-ServiceNowQuery {
237237

238238
$query -join ''
239239

240-
} else {
240+
}
241+
else {
241242
# Basic parameter set
242243

243244
# Create StringBuilder

ServiceNow/config/main.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,23 @@
132132
"Description": "field starts with the value",
133133
"RequiresValue": true
134134
},
135+
{
136+
"Name": "-startswith",
137+
"QueryOperator": "STARTSWITH",
138+
"Description": "field starts with the value",
139+
"RequiresValue": true
140+
},
135141
{
136142
"Name": ".endswith",
137143
"QueryOperator": "%",
138144
"Description": "field ends with the value",
139145
"RequiresValue": true
146+
},
147+
{
148+
"Name": "-endswith",
149+
"QueryOperator": "%",
150+
"Description": "field ends with the value",
151+
"RequiresValue": true
140152
}
141153
]
142154
}

0 commit comments

Comments
 (0)