Code JS to remove from the users domain name

I'm sure it's easy, but were not able to find what I need.  Did not of deeply in JavaScript and I need to find a way to take the owner of vRA strip the domain part attribute and simply feed the user name part.  Here's what I have, I shoot in al the vRA system information and map of those I need therefore to the owner, I have the script mapped the attribute like this

user = vCACVmProperties.get ('__Legacy.Workflow.User');

Then I use the property use to the content of the email that it sends to Servicenow to create a ticket, we have not fully integrated servicenow.  The problem is that the portions of the field are different, so what I have to do is to remove the domain part so that it only feeds the user name instead of [email protected] he feeds only username.  I that is need to take this user mapping that takes the user name and use it to describe something to give the output of the single user name, so I can feed in the email instead.  Any explanation help would be greatly appreciated.

If the user =

[email protected]

then the following should work for you:

var username = user.split("@")[0];

Tags: VMware

Similar Questions

Maybe you are looking for

  • IPhone 5 s side switch

    After updating ios 10 on my iphone 5s when I push on the side of switch upward is not vibrate please give me the solution.

  • Satellite P850-12Z - Toshiba DVD/BD drive is not compatible?

    My disc drive won't read disks. I get an error message saying your ot Toshiba dvd/blue-ray player version is not compatible with this version of windows which is 8.1. How can I fix it?

  • WRT160N problem, Cant update firmware (downgrade) PLEASE HELP!

    At this router running for a few weeks. Its got that * beep * problem connection but just today, it is even worse. Every 30 seconds or so, he will lose to the modem and internet connection for about 2 seconds. So even if I try to update my firmware u

  • I rolled back to Windows 7 and it asks for product key.

    * O.T. > WINDOWS 7 Hello every one i upgraded my PC windows 7 to 10. but it wasn't helpful so saved my pc to windows 7 again. but now its asking for the product key .can you guys help out me. I have tried many product keys for windows 7, from google

  • Content ID not found on AppWorld 30240

    Hi all. I made a package for my app on App World and after the creation of my project, I changed some code and wanted to update the package. I deleted the bundle and created a new one (with the same name) and I downloaded the new content. App World s