I have an initiation form for a custom activity created in c#. It would be very usefull if i could set the default value`s field in the initiation form as a current item column property.
Thank you in advance.
Gheorghe Dan

Re: SharePoint - Workflow Can i set the default value to a field in the initiation form from spd 2007 as a current item metadata?


First I don't understand term "initiation form for a custom activity"....maybe a custom workflow
Code Block
SPWorkflowActivationProperties workflowProperties = new SPWorkflowActivationProperties();

private m_yourField;

public [type] YourFiled
get{}, set{}

private void OnWorkflowActivated(object sender, ExternalDataEventArgs e)
//initializing here workflowProperties class object here
XmlSerializer serializer = new XmlSerializer(typeof(myFileds)); //myFields is a class defining your initiation form XML schema (see xsd.exe)
XmlTextReader reader = newXmlTextReader(new StringReader(this.workflowProperties.InitiationData));
myFileds initForm = null;
initForm = (myFields)serializer.Deserialize(reader)
YourFiled = initForm.[yourData] //if you want to store this data for additional reference somewhere in you code stuff or :

SPLIst list = workflowProperties.Item;
list["Your list column"] = YourFiled //probably casting or ToString() required


Good luck!