GetFinancialDataForFixedPeriod Function
GetFinancialDataForFixedPeriod(work item as ObjectIdentifier, nlr as ObjectIdentifier, field as String, period as string [, start year as Numeric, start month as Numeric, periods count as Numeric])
Category: | Financial Planning |
Description: | Returns a currency value for a specific currency field (Budget Cost, Budget Revenue etc.. for the specified Non-Labor Resource, for the a specified work item in the given time range. This should be the same amount that is displayed in Financial Planning view. {GetFinancialDataForFixedPeriod(work item,nlr,field,period,start year,start month,periods count)} |
Supported Context: | Business Rules |
Parameters: | work item as ObjectIdentifier(Object) |
nlr as ObjectIdentifier(nlr) | Represents a non-labor resource object for which you would like to calculate financial timephase data. |
field as string | The API name of the field in 'quotes' that you want to summarize for the time period. Note: Because the currency fields you will be referencing may not be directly referenceable using the Formula Options helper, you will need to manually input the field’s API name in the formula. The field API name can be seen in the Configure screen. Examples: “PlannedBudget”, “ForecastRevenue”. Full example below. |
period as string | Calendar Periods: ‘d’ for Current Day ‘w’ for Current Week ‘m’ for Current Month 'q' for Current Quarter 'y' for Current Year Fiscal Periods ‘fm’ for Fiscal Month 'fq' for Fiscal Quarter 'fy' for Fiscal Year |
Optional Parameters | Note: Start year and month will be according to whether you defined calendar or fiscal period in the previous parameter |
Start year as numeric | The calendar or fiscal year you want to start aggregating from. |
Start Month as Numeric | The calendar or fiscal month you want to start aggregating from. 1 to 12 If not set, will use Month 1 Only used if you have set a Start Year |
Periods count as Numeric | The amount of quantities to aggregated data from. The period used is the period (day, week, month, quarter, year) defined in the 3rd parameter. If not set, will use 1 Period Only used if you have set a Start Year and Start Month |
Example #1 |
Calendar Period: GetFinancialDataForFixedPeriod(CurrentObject(),'NLR-101','PlannedBudget','m') Fiscal Period: (CurrentObject(),’GetObjectByExternalID(‘NonLaborResource’,’Hotel’),'ForecastCost','fy',Year(today())+1,01) |