- Community Home
- >
- Software
- >
- HPE Morpheus Software
- >
- HPE Morpheus Enterprise Software
- >
- Re: Group Id to Group code
Categories
Company
Local Language
Forums
Discussions
- Integrity Servers
- Server Clustering
- HPE NonStop Compute
- HPE Apollo Systems
- High Performance Computing
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp Software
Knowledge Base
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2023 09:24 PM
04-18-2023 09:24 PM
Group Id to Group code
Currently we use group id and cloud id (zoneId) in our catalog to launch resources in different cloud and group. If we want to use Group Code, then currently we need to take another input with code, is it possible to infer group code from group id instead without any additional input?
- Tags:
- option-lists
- Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2023 03:29 AM
04-20-2023 03:29 AM
Re: Group Id to Group code
Example for conditions and spliting customOptions value
<%= if(customOptions.fieldName.tokenize('|')[1] == 'vmware') {'xx'} else {customOptions.fieldName.tokenize('|')[0]} %>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2023 05:42 PM
04-19-2023 05:42 PM
Re: Group Id to Group code
@sjabro Thanks. can you please provide an example in catalog config as well?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2023 04:07 PM
04-20-2023 04:07 PM
Re: Group Id to Group code
@aabraham Thanks. Any confluence document where can I find more of this? What language is being used and any built in functions? I will test this out and let you know the outcome.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2023 09:35 AM
04-19-2023 09:35 AM
Re: Group Id to Group code
You could do something like this in your Translations Script of your Option List
var i=0;
results = [];
for(i; i<data.length; i++) {
results.push({name: data[i].name, value: data[i].id + ":" + data[i].code})
}
This will display the group name in the dropdown and the value will look something like {{group_name}}:{{group_code}}
You could then use a split function in your catalog config on the “:” and take index 0 or 1 to get the id or code