Custom attribute format with attribute link

Hi Rich,
im trying to achieve this with rules. Can i make a custom attribute link with groovy? Thanks