Yet another runtime parameter idea, how about allowing a syntax like "SELECT * from accountlines WHERE debit_type_code like <<Pick a code|account_debit_types.code>>" So Koha then builds the parameter list based on a "select distinct code from account_debit_types" To make it even nicer, we could allow "<<Pick a code|account_debit_types.code:account_debit_types.description>>" so we use the code as our value but display the corresponding description.
Another awesome idea. I'd definitely like to see this implemented.