1. Implement %iFind.Transformation.Abstract interface with the custom transformation that would remove all property names (I assume you know property names beforehand).

After that set TRANSFORMATIONSPEC index parameter to your transformation implementation.

2. Maybe User Dictionaries could also be used.

3. Are you sure you need analytic queries? Simpler iFind indices (Minimal, Basic) can be advantageous in some situations.

Calling @Benjamin De Boe 
 

You can't bypass the challenge.
Neither by $classmetho() nor any code generator as this is all static code frozen and inflexible a runtime.  

Why?

A case where user must be able to:

  • create a code snippet with a predetermined interface
  • choose it for execution among all the code snippets with the same interface

Can be solved in many ways, without indirection (aka executing code stored as a string).

I usually provide a base class, which a user must extend and populate with his own methods. After that in the source app, just call SubclassOf Query from %Dictionary.ClassDefinition to get all implementation and show them to a user to pick from.

Works good enough.

The idea of a scrollable result set is to call Save/OpenId - and the result set would continue on a next row automatically. So you don't need to manage to/from indices:

 
Here's an example

It's also about 3 times faster since the query is only executed once:

do ##class(User.Pagination).Time("Save")
Save took 0,0048 sec
do ##class(User.Pagination).Time("NoSave")
NoSave took 0,0143 sec