I'm using a Value Table as a parameter for a Python toolbox so the user can input two related attributes. I'm struggling with how to use the values the user inputs as separate values/parameters. The code for my value table parameter looks like this:
target_elements = arcpy.Parameter(
displayName = "Target Element(s) Name",
name = "element_name",
datatype = "GPValueTable",
parameterType = "Required",
multiValue = True,
direction = "Input")
target_elements.columns = [['GPString','Target Element'],['GPString','EO ID (if known)']]
target_elements.filters[0].type = 'ValueList'
target_elements.filters[0].list = sorted(list(et_all.values()))
This code is giving me the desired toolbox operation. However, if the user input is "Abagrotis anchocelioides" for the first column and "53910" for the second column, the resulting output is a string that puts them together like this:
'Abagrotis anchocelioides' 53910
I'm not sure how to separate these values so that I can use them separately. I can't split on spaces because the first value often contains two words.
Is there another way to do this, or should I be using a different parameter type?