website logo
Navigate through spaces
Carrot reference
⌘K
Carrot reference
Getting started with Carrot
Built-in Carrot filters
Carrot fields
Basic Org Information
Compensation
Job Changes
Permissions
Personal
Recruiting
Structure
Time off
Data types
Elements of Carrot expressions
Functions
Operators
Keywords
Aggregators
Docs powered by archbee 
website logo

asOf()

Returns the result of a Carrot expression on a particular date using either only Primary data, or both Primary and Scenario based data.

Syntax

asOf - Returns the result of a Carrot expression on a particular date using data from both Primary, and the Scenario that the function is used in.

asOf( date: Date, expression:{CQL} )

  • date - The selected date.
  • expression - The Carrot (CQL) expression.
  • Return type: The data type result of the Carrot (CQL) expression.

Code sample

Result

asOf('2017-07-01', {performanceRating})

Returns the value of performanceRating as of January 7th, 2022 using data on Primary and from proposed Scenario changes.



asOfPrimary - Returns the result of a Carrot expression on a particular date using data from Primary.

asOfPrimary( date: Date, expression:{CQL} )

  • date - The selected date.
  • expression - The Carrot (CQL) expression.
  • Return type: The data type result of the Carrot (CQL) expression.

Code sample

Result

asOfPrimary('2017-07-01', '2022-08-01", 2.5)

Returns the value of performanceRating as of January 7th, 2022, using only the data on Primary. Does not include data from proposed Scenario changes.



Updated 27 Feb 2023
Did this page help you?
Yes
No
UP NEXT
boolean()
Docs powered by archbee