Returning more than one result from a function for OTL alternate name
I am working on limiting the number of Alternate Names that appear on the time card for a given employee in their department. I need to show that department's list of alternate names as well as an "generic list" of alternate name that all employees have access to.
I started off doing this in a function that calls the alias definition id based off of department but cannot seem to figure out the best way to add the department that all should see to it.
Function below works great for the one definition id I am trying to get but how do I add the definition id for all regardless of departments. Is a function able to return more than one result? If so how?