Search query within an workflow to get unique manager id values

It will make it cleaner I guess, will check later if that also worked.