How to determine allowable external formats at run time