Have a look at
You can generate the profile list from a function that pulls information from somewhere else.