I have a process variable of type RecordType in processes. Now I want to read the data in an expression rule.
The output now returns fields with the names c1, c2, c3, c4, ... My data from RecordType is in c4.
Can I filter the data directly with a!queryProcessAnalytics via a!query? For example, only the data records that were created in a specific country?
Expression Rule:
a!queryProcessAnalytics( report: cons!PGN_REPORT, contextProcessModels: cons!PGN_PROCESS_MODEL, query: a!query( filter: a!queryFilter(field: "c4"[country], operator: "=", value: "UK"), pagingInfo: a!pagingInfo(startIndex: 1, batchSize: - 1) ))
In my example, I realize that “c4”[country] does not work, but what do I need to write for this?
Discussion posts and replies are publicly visible
I would suggest you add an additional column to your Process Report where you set the value to the plaintext value represented by the "country" property of the recordtype data found in that PV. QueryProcessAnalytics filtering is pretty finnicky about data typing, and I'm not even sure whether doing filtering like this would work even for traditional CDTs - I've only ever had much success using hard-typed columns for the sake of filtering. (And just in case nobody else points this out, I would add that Record Type data is apparently not supported directly by Process / Task Reports.)
Process reports do not support record data. Try to add a separate process variable of type text and copy that value into it.
Process reports do not support Record Type fields directly. You should copy the needed Record Type data into separate process variables (text) in process to include and filter them in the report.