In a databases like the out of the box Discussion database, one can create new Categories by simply typing one in. (This can even be a nested categorie by using the '\' sign)
Now for the case of a code Sequence with dialogs a Version of Picklist / Prompt to allow the selection of catagories only would often simplify things
(Current workaround is loading all Data per @DBcolumn - not nice for Databases with many documents)
To me prefereably as Picklist option (with an option to show categories only in the dialog, another one if to expand or collaps, and in return an Array of the chain of categories the selected row represents).