Question
How to fetch Verification Station User for export?
Answer
(applicable only for rich stations) In Project Setup Station do the following:
- Go to Project > Project Properties > Stage Tools tab.
- Edit the Verification stage:
- Add an event handler On Task Close:
- And write the following script:
The script code:
using System;
try
{
foreach( IDocumentItem document in TaskWindow.DocumentsWindow.Items)
{
TaskWindow.OpenDocument( document.Document );
var section = document.Document.Sections[ 0 ];
var name = "usernameField";
if( section.HasField( name ) )
{
section.Field( name ).Text = FCTools.CurrentUserSession.UserName;
}
}
}
catch( Exception ex )
{
FCTools.ShowMessage( "Error: " + ex.Message );
CanClose.Value = false;
}
Comments
0 comments
Please sign in to leave a comment.