Kofax's weird naming convention strikes again - during setup, said items are referred to as BatchVariableNames
. However, during release they are KFX_REL_VARIABLE
s (an enum named KfxLinkSourceType
).
Here's how you can add all available items during setup:
foreach (var item in setupData.BatchVariableNames)
{
setupData.Links.Add(item, KfxLinkSourceType.KFX_REL_VARIABLE, item);
}
The following sample iterates over the DocumentData.Values
collection, storing each BatchVariable
in a Dictionary<string, string>
named BatchVariables
.
foreach (Value v in DocumentData.Values)
{
switch (v.SourceType)
{
case KfxLinkSourceType.KFX_REL_VARIABLE:
BatchVariables.Add(v.SourceName, v.Value);
break;
}
}
You can then access any of those variables by key - for example Scan Operator's User ID
yields the scan user's domain and name.