Hi,
I've made a default process with a Folio - Document Approval.
On start page a user enters number of the contract and it comes to K2.Net field "ContractNum".
Is it possible to set the Folio as a concatenation of these two strings, in order the user is able to see something like "Contract Approval - XX122/1005" in his Workspace and K2.Net SharePoint Webparts (tasks and history).
Unfortunately I'm unable to find where I can set the Folio in K2.Net Studio.
Regards,
Andrei
Page 1 / 1
In K2.net Studio add a server event and add the following code to the server event assuming you want to concatenate DataField1 and DataField2
K2.ProcessInstance.Folio = K2.ProcessInstance.DataFields("DataField1").value & " - " & K2.ProcessInstance.DataFields("DataField2").value
Sure you can do this. Have a look at the sample code under the Connection class of the K2ROM object model in the help file.
Regards,
Ockert
Regards,
Ockert
Thank you very much! I missed this...
Hi,
The same code is not working in C #.
K2.ProcessInstance.DataFields("DataField1") is Not available in C#. Can some give me the work around please ! :roll:
The same code is not working in C #.
K2.ProcessInstance.DataFields("DataField1") is Not available in C#. Can some give me the work around please ! :roll:
Try the following:
K2.ProcessInstance.Folio = K2.ProcessInstance.DataFields["Datafield1"].Value;
Just a comment...
If you're not completely comfortable with C#, VB.net is much more forgiving.
Regards,
Ockert
K2.ProcessInstance.Folio = K2.ProcessInstance.DataFields["Datafield1"].Value;
Just a comment...
If you're not completely comfortable with C#, VB.net is much more forgiving.
Regards,
Ockert
Hi,
simple question.
I an Infopath process do I have to use an Infopath Server Event if I want to set up my own custom folio or can I just use an Default Server event or better where is the difference you I think it should work with Default Server event, right ?
simple question.
I an Infopath process do I have to use an Infopath Server Event if I want to set up my own custom folio or can I just use an Default Server event or better where is the difference you I think it should work with Default Server event, right ?
webber77:Hi,
I've made a default process with a Folio - Document Approval.
On start page a user enters number of the contract and it comes to K2.Net field "ContractNum".
Is it possible to set the Folio as a concatenation of these two strings, in order the user is able to see something like "Contract Approval - XX122/1005" in his Workspace and K2.Net SharePoint Webparts (tasks and history).
Unfortunately I'm unable to find where I can set the Folio in K2.Net Studio.
Regards,
Andrei
If you are using K2.net a SmartForm for your plan (start) page, the easiest way to set the Folio is to set the DataField Property of the PlanButton to the Folio field. Then in the PlanButton's Click event you set the DataValue to whatever you like...
private void button1_Click(object sender, System.EventArgs e)
{
// Assuming that your Contract Number is being entered in a TextBox
// named txtContractNum
button1.DataValue = "Contract Approval - " + txtContractNum.Text;
}
Regards,
Mike
Thanks Mike,
Nice solution
Nice solution
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.