Skip to main content
April 16, 2024
Question

DataTime user filter

  • April 16, 2024
  • 9 replies
  • 0 views

Hi 

i am trying to filter the createdOn filed with both data and time 

Example : I need to get data from 16-04-2024 1:00AM to 16-04-2024 2;00AM

can any one help me how to implement this ?

    9 replies

    karumurua531442
    April 16, 2024

    Hi [mention:e300e7c35d4a422492d7e821e4d60813:e9ed411860ed4f2ba0265705b8793d05] could try this code and let me know this meets your requirement

    a!queryEntity(
      entity: /*your DSE*/,
      query: a!query(
        logicalExpression: a!queryLogicalExpression(
          operator: "AND",
          filters: {
            a!queryFilter(
              field: "date",
              operator: ">=",
              value: ri!startDate
            ),
            a!queryFilter(
              field: "date",
              operator: "<=",
              value: ri!endDate
            )
          },
          ignoreFiltersWithEmptyValues: true
        ),
        pagingInfo: a!pagingInfo(
          startIndex: 1,
          batchSize: 50
        )
      ),
      fetchTotalCount: false
    )

    April 17, 2024

    how to do the above functionality in user filter in record type?

    shubhama926776
    Brainy
    April 16, 2024

    [mention:e300e7c35d4a422492d7e821e4d60813:e9ed411860ed4f2ba0265705b8793d05]  You can try this

       a!queryFilter(
          field: /*Replace with your createdOn Field*/,
          operator: "between",
          value: {
            todatetime("04/06/2024 1:00 am"), /*Add You StartDate*/
            todatetime("04/16/2024 2:00 am")  /*Add Your EndDate*/
            
          }
        )

    शुभम्
    April 17, 2024

    But i am trying this for the userfilter field in record type ?




    karumurua531442
    April 17, 2024

    hi [mention:e300e7c35d4a422492d7e821e4d60813:e9ed411860ed4f2ba0265705b8793d05]  are you looking this type of user filter in record type search ?