- Community Home
- >
- Software
- >
- HPE Morpheus Software
- >
- HPE Morpheus Enterprise
- >
- How to get the cloud name in Forms
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
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
09-14-2024 06:59 AM
09-14-2024 06:59 AM
How to get the cloud name in Forms
Hi Team,
I have created the forms and added the two-option list one is group, and another one is cloud. based on the group selection its populating the cloud.
In my backend flow I am expecting to pass the Cloud-name instead of ID. If I am using the below one, I am only getting the ID of the cloud.
cloud=“<%=customOptions.cloud%>”
- Tags:
- automation

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2024 09:03 AM
09-14-2024 09:03 AM
Re: How to get the cloud name in Forms
Hi,
You can achieve this by creating a new Option List with the configuration below:
- Type:
Morpheus Api
- Option List:
Clouds
- Translation Script:
var results = [];
for (var x=0; x < data.length; x++) {
let cloud = data[x];
results.push({name: cloud.name, value: cloud.name});
}
It would produce an Option List containing a dataset like this:
[
{
"name": "aws",
"value": "aws"
},
{
"name": "XCP-NG-QA",
"value": "XCP-NG-QA"
},
{
"name": "additional cloud",
"value": "additional cloud"
}
]

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2024 12:28 PM
09-14-2024 12:28 PM
Re: How to get the cloud name in Forms
You can only get the cloud ID using the form method. If you are trying to ensure something like “'Only return Amazon type clouds”, you could do something like this in the option list translation script.
var i=0;
results = [];
for(i; i<data.length; i++) {
if (data[i].zoneType.code == "amazon") {
results.push({name: data[i].name, value: data[i].id});
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2024 09:17 AM
09-14-2024 09:17 AM
Re: How to get the cloud name in Forms
Thanks @Uthman_Eqbal …I have already applied the same but here the challenge is we need to show only specific clouds like azure or aws which is available in the forms if we go on this way we are not able to access that feature.