Skip to main content
shobhits0002
Inspiring
Apr 20, 2023 12:44 PM UTC
Solved

To display wait time which is waiting for more than a day.

Hi All,

To display wait time which is waiting for more than a day.

We are converting createdDate(date time format) in days and hours. 
Now, ask is to display the WAIT TIME only when it is more than 1D 0H.
But, queryFilter field is createdDate(date time format). In that case how can we display this.

Query Filter which I'm using at present  (I know it's not correct), could anyone help me in getting this expression correct.

    stefanhelzle0001
    Brainy
    Apr 20, 2023 1:51 PM UTC

    Something like this should do it.

    a!queryFilter(
      field: 'recordType!{95faa2ae-87b5-4ff9-a70d-a308b0d956a4}.{createdAt_date}createdAt_date',
      operator: "<",
      value: a!subtractDateTime(
        startDateTime: now(),
        hours: 10,
        useProcessCalendar: false /* Make this true to respect working time */
      )
    )

    6 replies

    stefanhelzle0001
    Brainy
    Apr 20, 2023 1:42 PM UTC

    You are writing about various things here. What is your actual question?

    shobhits0002
    Inspiring
    Apr 20, 2023 1:46 PM UTC

    Hi Stefen,
    Sorry for making it complex.
    Actually, I need to display any record which has WAIT TIME greater than 1D 0H from the createdAt_date. 

    stefanhelzle0001
    Brainy
    Apr 20, 2023 1:51 PM UTC

    Something like this should do it.

    a!queryFilter(
      field: 'recordType!{95faa2ae-87b5-4ff9-a70d-a308b0d956a4}.{createdAt_date}createdAt_date',
      operator: "<",
      value: a!subtractDateTime(
        startDateTime: now(),
        hours: 10,
        useProcessCalendar: false /* Make this true to respect working time */
      )
    )