Use SQL to write AutoAccounting Rule with more than one Lookup Set
I'm working on an implementation where I need to map a single expenditure type to multiple GL accounts, based on a project class code. So, if the class code = 'Class A' then the rule should map to the lookup set 'Lookup Set A' where the expenditure types and GL accounts are defined. Class code 'Class B' should map to the lookup set 'Lookup Set B', class code 'Class C' should map to the lookup set 'Lookup Set C' and so on.
I know there's a way to do this with either the SQL DECODE or CASE functions, but I can't quite get there. Any pointers would be most appreciated. Also, there would be no lookup set specified in the AA rule setup, correct? The source field should still be 'Intermediate Value'?