Hello, I'm getting this strange error.
I created a balance HAJ_LEAVE_BALANCE, which feeds in a Days input value into the balance and added the assignment inception to date dimension to it.
Now in my BG_ABSENCE_DURATION formula, I'm trying to use this balance to compare, like:
if HAJ_LEAVE_BALANCE_ASG_ITD = 0 then e.t.c. Of course I already added the line
DEFAULT FOR HAJ_LEAVE_BALANCE_ASG_ITD IS 0
at the top of my formula.
Unfortunately I keep getting this error:
APP-FF-33005: The local variable HAJ_LEAVE_BALANCE_ASG_ITD was used before being initialized
Not sure why this would happen. Can I use balances in quickpaint formulas or not? The balance is clearly visible in the table ff_database_items so I'm really scratching my head here
The message occurs because the formula compiler doesn't recognise that as a database item. The DB items you use in any formula are only usable if they have all their required contexts set by the calling process - a QP-type formula does not set all the contexts that a payroll-type formula would. Check out the table FF_FTYPE_CONTEXT_USAGES to see the differences between the two formula types (formula_type_id = 61 for payroll, 101 for QP)
In short, if you want to obtain balances for a QP formula you might need to make use of a pl/sql function within the QP formula.
Edited by: clive_t on 31-Dec-2012 10:57
Edited by: clive_t on 31-Dec-2012 11:03