Skip to main content
August 9, 2022
Solved

Expression rule Query Error

  • August 9, 2022
  • 3 replies
  • 0 views

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??

Best answer by harshitb6843
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
August 9, 2022
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
August 9, 2022

Thanks, it worked now

stefanhelzle0001
August 9, 2022

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