Skip to main content
Nintex Community Menu Bar

Capture the Originator to a Data field

  • September 19, 2006
  • 4 replies
  • 18 views

Forum|alt.badge.img+2
I have browsed through the knowledge base and the forums regarding methods of capturing the originator of a process. The method of choice is to create a data field and update this field with the information.

My question is, how is this done?

I have tried methods I have used successfully to update other data fields, but can not get this one to work.

Thanks,

JR

4 replies

Forum|alt.badge.img+9
  • Nintex Partner
  • September 19, 2006
All you should need to do is:

- Create a process datafield called "Originator".
- Within a Server Event, put the following line of code:

K2.ProcessInstance.DataFields["Originator"].Value = K2.ProcessInstance.Originator.FQN;


Please note the Originator is a K2ROM User object. FQN (Fully Qualified Name) is one of the properties. You may be interested in checking out if others are more approrpiate for you.

Forum|alt.badge.img+2
  • Author
  • September 19, 2006
Please bear with me, I am not a code writer, but was assigned this task.

My server event has the following code:

Sub Main(ByVal K2 As ServerEventContext)
K2.Synchronous = True
K2.ProcessInstance.DataFields["Originator"].Value = K2.ProcessInstance.Originator.FQN
End Sub

I get the following errors when I compile the solution:

Line 3: Property access must assign to the property or use its value.
Line 3: Identifier expected

Thank you,

JR

Forum|alt.badge.img+9
  • Nintex Partner
  • September 19, 2006
I believe proper VB.NET syntax should be (note the "(" instead of the "[", which is C#):

K2.ProcessInstance.DataFields("Originator").Value = K2.ProcessInstance.Originator.FQN

Sorry for any confusion.

I hope this helps.

Forum|alt.badge.img+2
  • Author
  • September 19, 2006
Bob,

Thank you, that fixes the problem.

JR