I think you can accomplish the first part using:
which can then be used in further CONTAIN type calculated fields.
Using the conditional will help you for the second part:
IF FIRST()=0 THEN ATTR([Roles])
THEN PREVIOUS_VALUE("")+", "+ATTR([Roles])
Please see workbook v10.3 attached in the Forum Thread:
287909running_v10.3.twbx 26.4 KB
Swaroop, Thank you so much for your time on this.