Skip to main content
Inspiring
Aug 9, 2022 6:57 AM UTC
Solved

Expression rule Query Error

Hi, I'm doing the activity of the course, but I got a problem with this query: 

a!queryRecordType(
recordType: 'recordType!{058be2d0-0acb-453f-93ac-4c9f650cf004}Vehicle',
fields: a!aggregationFields(
groupings: a!grouping(
field: Vehicle.make,
alias: "Vehiclemake"
),
measures: a!measure(
field: Vehicle.make ,
function: "COUNT",
alias: "count"
)
),
pagingInfo: a!pagingInfo(
startIndex: 1,
batchSize: 100
)
) .data

when I tried to test the rule I got this error: Expression evaluation error at function a!aggregationFields [line 3]: Could not find variable 'Vehicle'

I followed every single step in the exercise So, I don't understand what's the wrong here. Can anyone tell me what's the wrong??

harshitb6843
Brainy
Aug 9, 2022 6:59 AM UTC
field: Vehicle.make

The field has to be written using the recordType! domain. Similar to how you have provided it for the 'recordType' property. 

3 replies

harshitb6843
Brainy
Aug 9, 2022 6:59 AM UTC
field: Vehicle.make

The field has to be written using the recordType! domain. Similar to how you have provided it for the 'recordType' property. 

alim9650Author
Inspiring
Aug 9, 2022 9:11 AM UTC

Thanks, it worked now

stefanhelzle0001
Brainy
Aug 9, 2022 6:59 AM UTC

In your a!measure() you need to provide the field name in record type syntax.