with( local!datasubset: queryrecord( recordType: cons!SARIKA_CRM_SERVICE_REQUEST_RECORD_CONSTANT, query: rule!APN_querySelection( fields: {"clientID", "requestDate", "status", "requestType", "customerServiceRep", "comments"}, filter: rule!APN_logicalExpressionAND({ rule!APN_queryFilter( field: "requestDate", operator: "not null" ), /* if a user has selected a category, get the category at the selected index */ rule!APN_queryFilter( field: "requestType", operator: "includes", value: if(rule!APN_isBlank(ri!requestType),tostring(ri!requestType)) ) } ), pagingInfo: local!pagingInfo ) ), { rule!APN_uiGrid( totalCount: local!datasubset.totalCount, label:"Items in Inventory", columns: { rule!APN_uiGridTextColumn( field:"requestType", label:"Request Type", data: index(local!datasubset.data,"requestType",{}) ) }, value:local!pagingInfo, saveInto:local!pagingInfo ) } )