Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
I'm trying to get an selected item from a ComboBox to an specific Parameter value:
ComboBox1.text=ComboBox1.SelectedItem.Value
parameter(12) = mdl.GetParam("Parameter1")
pvalue(12) = (New CMpfcModelItem).CreateStringParamValue(ComboBox1.Text)
CType(parameter(12), pfcls.IpfcBaseParameter).Value = pvalue(12)
Now I'm getting the following Toolkit Error:
Without seeing any declerations of your objects and variables the error can pretty much be anything.
parameter(12) indicates some type of array but i can not see the type
Try something like this...
Dim CBText as String = ComboBox1.text
Dim parameter As IpfcParameter
Dim paramValue As IpfcParamValue
parameter = mdl.GetParam("Parameter1")
' Get param type
Dim type As String = PDUtils.getTypeFromParam(CType(parameter, IpfcBaseParameter).Value)
' Create param value
paramValue = PDUtils.createParamValue(CBText, type)
' Set param value
CType(parameter, IpfcBaseParameter).Value = paramValue