Set process parameter in script task


how would I go about setting the process parameters in the screenshot, for instance the code for CellPhoneNumber is CellPhoneNumber. I have tried 

Set<ObjectList<string>>("CellPhoneNumber", CellPhoneNumbers);


Set<ObjectList<string>>("Collection.CellPhoneNumber", CellPhoneNumbers);

but for both I get the error that the process parameter does not exist


Like 0



Hi Tyler,

If the process parameter is a string/text param, all you need to do is:

Set("ParamName", "The param value");

(I don't see a screenshot in your post so not sure if it's something other than a simple text param)


Ryan Farley,

Thank you for the response, I have now uploaded the screenshot

If it's a collection that does change things slightly with how you use it. The type of collection would matter (if a collection of records or collection of values etc). 

To add a record into the collection it would look something like this, assuming the param is a collection of records - based on your screenshot and assuming you're adding a new item to the collection:

// create collection/list
var list = new CompositeObjectList&lt;CompositeObject&gt;();
// create item and add to collection/list
var item = new CompositeObject();
item["CellPhoneNumber"] = "800-555-1212";
item["SomeOtherParamInCollection"] = "Some value, etc";
// now set in param
Set &lt;CompositeObjectList&lt;CompositeObject&gt;&gt;("MyCollectionParamName", list);

See more here…


Show all comments