If you want to store a list object in a string field, you will need to serialize it.
You could use the Python repr() function for this.
out1.Issue_Owner = repr(dropdown_options)
Then when you need that value later on in Python code, use the eval() function:
dropdown_options = eval(in1.Issue_Owner)
And I've found the json library's json.dumps() and json.loads() is much faster than the repr(), eval() combination.
Ernest
------------------------------
Ernest Jones
Precisely Software Inc.
PEARL RIVER NY
------------------------------
Original Message:
Sent: 10-03-2024 12:30
From: Trent Karr
Subject: Create a dropdown menu in an excel column
I'm looking to see if something is possible. I was not able to find anything through the search. I'm creating a column through a transform node and looking to make it a dropdown (data validation list). Using the transform node I created a new column under the configure fields:
out1.Issue_Owner = str
and then using this code in the processrecords:
dropdown_options = [
'Resale', 'Sales', 'Care', 'LSPAC', 'Remaining Services', 'OP',
'Repair', 'Offline Support', 'Translations'
]
out1.Issue_Owner = dropdown_options
This is not working due to it looking for a single input instead of a list. Is this something possible or am I chasing my tail?
Thanks!
------------------------------
Trent Karr
Knowledge Community Shared Account
Burlington MA
------------------------------