I am sure this is easy but have not been able to find what I need. Have not gotten deeply into JavaScript and I need to find a way to take the owner attribute from vRA strip off the domain portion and just feed the username portion in. Here is what I have, I pull in al information on the system from vRA and map the ones I need so for the owner I have the scripting mapped to the attribute like this
user = vCACVmProperties.get('__Legacy.Workflow.User');
Then I use the user property for an email content that sends it to Servicenow to create a ticket, as we do not have servicenow completely integrated. The problem is the domain portions are different so what I need to do is strip off the domain portion so that it only feeds the username so instead of username@domain.com it only feeds username. So I either need to take that user mapping that takes in the username and use it to script something to give the output of only username so I can feed that into the email instead. Any help explaining would be greatly appreciated.