Does anyone know how to see a global variable value per record if that global variable value changes per record?
My actual process is more complex, but in general I have three fields in my query (Account, Amount, FormulaType).
The 'Amount' field calls a custom function. That function runs one of two formulas (formula 1 or formula 2) depending on the value of account #.
I want to put '1' or '2' into the third field of the query depending on which formula was used, BUT I don't want to run the function a second time (it takes too long).
Instead, I use a global variable and set the global variable's value to either '1' or '2' each time the function is run.
The problem is that while the global variable's value changes each time the function is run, it doesn't change for each record in the query. Instead it, each record shows whatever formula number was used for the very first account.
I assume that the query doesn't see the "refreshed" global variable value after the first record.
Thanks for the advice!
My actual process is more complex, but in general I have three fields in my query (Account, Amount, FormulaType).
The 'Amount' field calls a custom function. That function runs one of two formulas (formula 1 or formula 2) depending on the value of account #.
I want to put '1' or '2' into the third field of the query depending on which formula was used, BUT I don't want to run the function a second time (it takes too long).
Instead, I use a global variable and set the global variable's value to either '1' or '2' each time the function is run.
The problem is that while the global variable's value changes each time the function is run, it doesn't change for each record in the query. Instead it, each record shows whatever formula number was used for the very first account.
I assume that the query doesn't see the "refreshed" global variable value after the first record.
Thanks for the advice!