- Community Home
- >
- Software
- >
- HPE Morpheus Software
- >
- HPE Morpheus Enterprise Software
- >
- Re: Create Option list for Python Task
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-24-2023 10:42 PM
04-24-2023 10:42 PM
Create Option list for Python Task
I want to create a options list for python task which should be “List” based options list ,
Using Get method
1.i need to get the lists and pass to an enduser when he submittes workflow or catalog
2.I dont see any option to pass these option list to Python task
I get this error when i pass option list in workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2023 06:27 AM
04-25-2023 06:27 AM
Re: Create Option list for Python Task
Sorry @Paul_B, that was my fault on the information I provided. My mind glanced over the Python portion.
I updated my post with better information. I hope it helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2023 06:23 AM
04-25-2023 06:23 AM
Re: Create Option list for Python Task
i already used “<%= customOptions.PoolSelectionManual %>” , it needs to be an integer but anyway both are not accepting by system
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2023 06:57 AM
04-25-2023 06:57 AM
Re: Create Option list for Python Task
You may have to do
int("morpheus['customOptions']['PoolSelectionManual']")
but how @kgawronski wrote the var is how we pass them into Python. (Assuming your input fieldName is “PoolSelectionManual”.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2023 06:07 AM
04-25-2023 06:07 AM
Re: Create Option list for Python Task
Hello @Paul_B,
Using your example I see in the error, I’d expect it to be:
morpheus['customOptions']['PoolSelectionManual']
Similar example:
data = {"ldevId": None, "poolId": morpheus['customOptions']['PoolSelectionManual']}
That should remove the error from the syntax checker. All variables in Python are put in the morpheus variable.
Additional info on the different syntax based on the language:
https://docs.morpheusdata.com/en/latest/troubleshooting/Variables_Examples.html#syntax-examples
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2023 01:31 AM
04-26-2023 01:31 AM
Re: Create Option list for Python Task
Hi , I get below error after trying your suggestion
Traceback (most recent call last):
File “”, line 11, in
KeyError: ‘Pool_Selection_Manual_Text’
Its my code
data = {“ldevId”: None, “poolId”: morpheus[‘customOptions’][‘Pool_Selection_Manual_Text’], “byteFormatCapacity”: morpheus[‘customOptions’][‘ByteFormatCapacity’]