Thought that I had this working
http://www.scriptcase.net/forum/forum/applications/forms/70786-solution-use-a-global-variable-in-lookup-based-on-value-of-another-field
But - it is retaining the last value selected and I cannot figure out how/where to reset the value of those global variables. It does write the appropriate values to the database - but in SC, when I go back and look at the record later, those fields are empty. If I change one record then the next record that I look at, the fields are empty and the lookup is displaying the values selected the last time that i used it (Hope that makes sense).
Here’s what I want to do:
Select a transaction type (for example “deposit” or “withdrawal”)
Depending on the transaction type selected, change the lookup for account1 and account2 - so that only the accounts that have the same account_type are listed (for example - a deposit should use an “income” account and “bank” account - but a withdrawal should use a “Bank” account and “Expense” account)
Select the appropriate account (if Deposit; account1 = “Income”, account2 = “bank” - but if Withdrawal; account1 = “Bank” and account2 = “Expense”)
Have tried to reset the variable in every event - and have found that if I reset the variable then I don’t get a lookup list at all.