Do you have access to the APMJobTable report in the Reports section of AOT?
This fulfills your requirement, and will show you how to use the dialog correctly - I always find it easier to work from an example rather than someone elses code, and it gives you the correct naming conventions, best practices etc…