Skip to main content
vijaykumars5676
January 9, 2023
Question

Drillable Chart

  • January 9, 2023
  • 4 replies
  • 0 views

I have column chart as shown in image and have made it drillable.

How do I filter records to show corresponding months records?

    4 replies

    stewart.burchell
    January 9, 2023

    Make a second Interface object that has the relevant rule input(s) that you need to render the "corresponding months records" and then when you have that working, in your above chart when you click on a given bar - say 'Apr' - then save the corresponding value(s) that match the rule input(s) to your new Interface into the local variable(s) that you will map to those rule input(s).

    vijaykumars5676
    January 9, 2023

    I have this code : 

    filters: a!queryLogicalExpression(
    operator: "AND",
    filters: {
    a!queryFilter(
    field: 'recordType!DDE Invoice Data.date',
    operator: "between",
    value: {date(2000,local!selectedmonth,1),date(2100,local!selectedmonth,30)},
    )
    },
    ignoreFiltersWithEmptyValues: true,
    ),

    Error : 

    Could not cast from Map to Number (Integer). Details: CastInvalidCould not cast from Map to Number (Integer). Details: CastInvalid

    konduruc733182
    January 9, 2023

    Hello vijaykumars5676,

    You can use the dynamic link and save the selected value into a local variable. You can pass this local variable into the query filter value of your recordType query. Using this data you can display in a grid

    prafuls972
    January 10, 2023


    a!gridField(
        
        data: a!recordData(
          recordType: 'recordType!recordName',
          filters: ri!filters
        ),
    )
    /*ri!filters is of any type 
    Calling Interface*/
    a!localVariables(
      local!month: 2,
      local!year:2022,
      /*whenever you change a month use saveinto in the dynamic link and change the value of local!year and local!month*/
        rule!drillableInterface(
        filters:
        a!queryFilter(
            field: 'recordType!{af5896a5-34b7-4d2f-9d8a-901d89ca73fb}ABSB Case Record.fields.{createdAt}createdAt',
            operator: "between",
            value: {  date(local!year,local!month,1), eomonth(date(local!year,local!month,1)) }
            )
        )
    )

    Please refer to the code here you need to pass filters in the grid field as rule input of type any type. And where you are calling set the rule input as shown in the code.