Using filter in the record, count the days from date range

HI,
 I have a question regarding the Filters.
Like I have table of name Employee and it has column -ID,Name,JoiningDate and LastDate.

So Is there any way to count the number of working days of the emplyoee and show on the Interface in the records.
Using filters as well,

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Senior Developer
    in reply to romav0001

    Something like above. Calculate the date difference using a custom record field and create a user filter.

    Example code for User filter-Update accordingly
    
    a!localVariables(
      local!days: a!forEach(
        items: enumerate(10) + 1,
        expression: fv!item * 100
      ),
      a!recordFilterList(
        name: "Number of Days",
        options: a!forEach(
          items: local!days,
          expression: a!recordFilterListOption(
            id: fv!index,
            name: concat("<", fv!item, " Days"),
            filter: a!queryFilter(
              field: 'recordType!KS Sample.fields.Days',
              operator: "<",
              value: fv!item
            )
          )
        )
      )
    )

    Custom field using sync-time evaluation. just a normal date difference by subtraction your last date and joining date and format using toInteger()

Children