Hello, I have a rule in which I would like to send a day, month or year as a reference and have it return the corresponding records.
This is my code
a!queryRecordType( recordType: 'recordType!{5871e10b-6fc1-4f38-a51a-becdd72dcf12}AOC CLAIM', fields: { 'recordType!{5871e10b-6fc1-4f38-a51a-becdd72dcf12}AOC CLAIM.relationships.{f1cf2f3a-4ab2-483a-837d-630a35530587}area.fields.{12767694-751c-4c75-8f60-5c0c1ce095ff}value', 'recordType!{5871e10b-6fc1-4f38-a51a-becdd72dcf12}AOC CLAIM.relationships.{a51767bd-0bc5-405c-9791-69b30b3e44c4}status.fields.{74564548-1877-4eb5-9591-25652490fc06}value', 'recordType!{5871e10b-6fc1-4f38-a51a-becdd72dcf12}AOC CLAIM.fields.{9b248167-138b-46e6-88ce-7c2cc3df93bc}id', 'recordType!{5871e10b-6fc1-4f38-a51a-becdd72dcf12}AOC CLAIM.fields.{bd5d065d-3a84-4456-9b71-26fab0f1ef07}startDate' }, filters: a!queryLogicalExpression( operator: "AND", filters: { a!queryFilter( field: 'recordType!{5871e10b-6fc1-4f38-a51a-becdd72dcf12}AOC CLAIM.relationships.{a51767bd-0bc5-405c-9791-69b30b3e44c4}status.fields.{1a32537a-a5c5-41d7-8ac6-f0a5acef2408}id', operator: "=", value: 4, applyWhen: ri!showCloseClaim ), a!queryFilter( field: 'recordType!{5871e10b-6fc1-4f38-a51a-becdd72dcf12}AOC CLAIM.fields.{bd5d065d-3a84-4456-9b71-26fab0f1ef07}startDate', operator: "between", value: ri!daySearch ), a!queryFilter( field: 'recordType!{5871e10b-6fc1-4f38-a51a-becdd72dcf12}AOC CLAIM.fields.{bd5d065d-3a84-4456-9b71-26fab0f1ef07}startDate', operator: "=", value: ri!monthSearh ), a!queryFilter( field: 'recordType!{5871e10b-6fc1-4f38-a51a-becdd72dcf12}AOC CLAIM.fields.{bd5d065d-3a84-4456-9b71-26fab0f1ef07}startDate', operator: "between", value: ri!yearSearch ) }, ignoreFiltersWithEmptyValues: true ), pagingInfo: a!pagingInfo( startIndex: 1, batchSize: 5000 ), fetchTotalCount: true() )
and this is my rule Inputs:
This is an example of my information:
all this to create a pie chart
Discussion posts and replies are publicly visible
Hi x_XRiperX_x
You are passing date and time field to the year, day or month filter it will give the same output if you pass any filter. As Mathieu suggested you can use custom fields to get the year , month .
So that you can pass the year, Month or day alone instead of date.