system.kanoa.cmms.getImageData(paramsDict)
Returns a dataset of CMMS image records, filtered according to the keys supplied in paramsDict.
All keys in paramsDict are optional, so callers can narrow the results by image ID, name, type, linked procedure step check, or a date range,
and can optionally request that the actual image and/or thumbnail bytes be included inline in the results (both default to excluded for performance, since callers often just need the listing metadata).
This is the function to use when browsing or searching across many image records, rather than fetching a single image directly (see getImage and getImageThumbnail for single-record retrieval).
Parameters
paramsDict Dictionary
| - chkImageId | Integer | Filter by chkImageId |
| - imageName | String | Filter by image name |
| - imageType | String | Filter by image type |
| - includeImage | Boolean | Include image. Set to False if not supplied |
| - includeThumbnail | Boolean | Include thumbnail. Set to False if not supplied |
| - procedureStepCheckId | Integer | Filter by procedureStepCheckId |
| - rangeEnd | DateTime | |
| - rangeStart | DateTime |
Returns
imageData pyDataset
Example
# Look up all images attached to a specific procedure step check, taken within the last 7 days, including thumbnail bytes for a gallery view.
rangeEnd = system.date.now()
rangeStart = system.date.addDays(rangeEnd, -7)
paramsDict = {
"procedureStepCheckId": 9821,
"includeThumbnail": True,
"includeImage": False,
"rangeStart": rangeStart,
"rangeEnd": rangeEnd
}
imageData = system.kanoa.cmms.getImageData(paramsDict)