_getDT
Gathers data about Marketing Expenses and their linked Sources, filtered within a period of time:
The ID of the Expense
The ID of the Marketing Source linked to the retrieved Expense
The cost of the Expense
The date of the Expense
Parameters
draw
A number which is echoed back to the caller. Useful for avoiding race conditions.
start
The number of entries skipped before the function starts retrieving Expenses.
length
The number of entries returned, if the "start" parameter is higher than 0, skipped entries are not included.
dateFrom
The earliest date where Marketing Expenses are valid to be retrieved (relates to the current date, e.g 2 days ago would be "-2")
dateTo
The latest date where Marketing Expenses are valid to be retrieved (relates to the current date, e.g an exact week later than today would be "7")
Examples
For these examples: The function is called on 30th May, 2023. start = 0, length = 10, dateFrom = 10, dateTo = 31
Result:
In this example: start = 0, length = 10, dateFrom = -2, dateTo = 14
Result:
On Failure
If the "draw" parameter is not set
Last updated