Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • The period Component query is only applicable for Date and DateTime fields.

  • The value type used in the period query are as follows

    • custom

      • If we set the value type custom then we have to give the value

      • ex. {valueType: custom, value: “2023-06-24”}

    • relative

      • If we set the value type relative then it will take the value as the current date and time

  • The operators used in a period component query are as follows

    • equals

    • greaterThan

    • greaterThanEquals

    • lessThan

    • lessThanequals

    • current

    • next

    • currentAndNext

    • previous

    • currentAndPrevious

    • during

  • Fiscal Year and Fiscal Quarter

    • You can set the fiscal year on the instance using the field FYYearStartMonth

    • For example, you set FYYearStartMoth:

      • { label: “Mar”, value:3}

    • Then your year will start to March to Feb

Period Units

  • The period units

  • The period units used in the period component query are as follows

    • milliseconds

    • seconds

    • minutes

    • hours

    • days: n

      • If conditions: { periodUnit: days, periodCount: 'n'}

        • It will return the records which are created between the current date to 'n' days

      • If conditions: { periodUnit: days, periodCount: -'n'}

      • It will return the records which are created from the 'n' days prior to the current date

    • weeks: n

      • If conditions: { createdOn: "weeks:n"}

        • It will return the records which are created between the current week to 'n' weeks

      • If conditions: { createdOn: "weeks:-n"}

        • It will return the records which are created from the 'n' weeks prior to the current week

    • months: n

      • If conditions: { createdOn: "weeks:n"}

        • It will return the records which are created between the current month to 'n' months

      • If conditions: { createdOn: "weeks:-n"}

        • It will return the records which are created from the 'n' months prior to the current month

    • calQuarters: n (calendar quarter)

      • If conditions: { createdOn: "calQuarters:n"}

        • It will return the records which are created between the current calendar quarter to 'n' calendar quarters

      • If conditions: { createdOn: "calQuarters:n"}

        • It will return the records which are created from the 'n' calendar quarter prior to the current calendar quarter till the current calendar quarter

    • fYQuarters: n (financial quatrer)

      • If conditions: { createdOn: "fYQuarters:n"}

        • It will return the records which are created between the current financial quarter to 'n' financial quarters

      • If conditions: { createdOn: "fYQuarters:n"}

        • It will return the records which are created from the 'n' financial quarter prior to the current financial quarter till the current financial quarter

    • calYears: n (current calendar year)

      • If conditions: { createdOn: "calYears:n"}

        • It will return the records which are created between the current calendar year to 'n' calendar years

      • If conditions: { createdOn: "calYears:n"}

        • It will return the records which are created from the 'n' calendar year prior to the current calendar year till the current calendar year

    • fYYears: n (current financial year)

      • If conditions: { createdOn: "fYYears:n"}

        • It will return the records which are created between the current financial year to 'n' financial years

      • If conditions: { createdOn: "fYYears:n"}

        • It will return the records which are created from the 'n' financial year prior to the current financial year till the current financial year

...

  • By using the current operator it will fetch records according to the period unit from beginning to end

  • The value type for operator current is always relative

    • If conditions: {periodUnit: days}

      • It will return all records of the current day}

    • If conditions: {periodUnit: weeks}

      • It will return all records of the current week from Sunday to Saturday

    • If conditions: {periodUnit: months}

      • It will return all records of the current month from 1st day of the current month to the last day of the current month

Next Operator

  • If conditions: {periodUnit: days, periodCount: n}

    • It will return records between next day and the period count day

      • ex. {periodCount: 3}

During Operator

  • During means some time between the beginning and the end of a period

  • The during operator of the period component query is applicable for the Date and DateTime fields

...