Replies: 1 comment
-
@HKSausage install_status is a reference field and querying isn’t as straightforward as serial number which is a string. You can find the name and value by using
The ‘value’ is what you need to query for. You can also set |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to pull records from cmdb_ci_computer table, with a certain serial number and the install_status as Retired.
I tried Get-ServiceNowRecord -table 'cmdb_ci_computer' -Filter @('serial_number', '-eq', $SerialNumber), '-and', @('install_status', '-eq', 'Retired')
I get 0 records
If I remove the '-and', @('install_status', '-eq', 'Retired') part, it returns 10 records, with 9 of them having Retired install_status
I also tried
$filter = @('serial_number', '-eq', $SerialNumber),
'-and',
@('install_status', '-eq', 'Retired'),
then use the variable as in the example, but still returns 0 records
Beta Was this translation helpful? Give feedback.
All reactions