Skip to main content
Nintex Community Menu Bar

Getting an made choice in a server event

  • May 19, 2009
  • 2 replies
  • 16 views

Forum|alt.badge.img+1

Newbie coming through... 

Hi experts, I have a question maybe somebody can help me out.

I'm building the following flow.

 screenshot

1) User Event; A user will be presented with two choices "A" and "B"
2) Server Event; Here I need to determine what choice was made
3 & 4) Here I do a check on what choice was made
note: I use a variable "X" where the choice need to be saved in and that will be read in step 3 & 4

My question: How can I access the choice made by the user, in step 2? Preferably C# coding.

Best regards,

Guido 

 

 

2 replies

Forum|alt.badge.img+3

You can create a datafield.  In step 2 in your server event, you can set this datafield value equals to the choice the user has selected in step 1.  Then in step 3 and 4, all you have to do is use line rules :)


HTH,


Brian


Forum|alt.badge.img+1
  • Author
  • May 20, 2009

Ok,


 


I solved it myself (with thanks to Google)


string actionResult = null;
foreach (SourceCode.KO.Slot slot in K2.ActivityInstanceDestination.ActivityInstance.WorklistSlots)
{



if (slot.DataFields.Contains("Action Result"))
{



actionResult = (string)slot.DataFields["Action Result"].Value;
K2.ProcessInstance.DataFields["ManagerAkkoord"].Value = actionResult;


}


}