- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2018 04:02 AM
HI all,
I have come across an interesting one today which I'm looking for a bit of advice on.
Im currently building a form within the service catalog where users can request the addition or removal of CPU, RAM and Disk for existing VM's from the service portal.
At the top of the form I have a reference field which references the server table within the cmdb to display the server name, I then have a client script/script include combo which then pulls in and displays the servers current CPU count and RAM.
The issue I've got is people order RAM in GB, but discovery updates the CI records with RAM in MB, so I need to somehow have the CI's RAM converted from MB to GB, I also need to make this conversion in a place that makes architectural sense. It seems that discovery updates the CI record directly rather than via a transform map(?) so I can't catch it there and if I make the conversion on the catalog items it's not really a scalable solution, is it best to create a new field on the CI form which references the MB ram and converts it?....also, how is the conversion calculated in JS?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2018 06:41 AM
If you want the CI to displayed in GB, then I would do a BEFORE INSERT/UPDATE BR that simply divides the value by 1024.
If you're OK with the CI storing MB and your primary concern is with the service portal field, then a client script can do it for you right before you display the value in that field.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2018 06:41 AM
If you want the CI to displayed in GB, then I would do a BEFORE INSERT/UPDATE BR that simply divides the value by 1024.
If you're OK with the CI storing MB and your primary concern is with the service portal field, then a client script can do it for you right before you display the value in that field.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2018 12:06 PM
If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.
Thank you