FlexiLayout Studio: Is it possible to set a default value for a block or a character string?

Question

Is it possible to set a default value for a block or a character string? 

In order for the field to store the value, the field must be found. Also, with the Script in FL there will be the same result.
So, basically, there is no easy way to do it in the FL, but there is a workaround 

 

Answer

1) First of all, you need to create a field in the FL to capture "Name1" and "Name2" ( so if the input image is "Name1", that field will store the value "Name1", and if the input image is "Name2", the field will store value "Name2" )
2) In the FC project, under the workflow, after the Recognition stage, create a custom Script stage

3) In this custom stage, check the value of that field. For example (if the value of that field is "Name1", then you can set the VendorID or VendorName (or other fields)  to whatever default value you want. If the value of the field is "Name2", then you can set the ID or Name (or any other field) to whatever default value you want via scripting.

Script example:

if(Document.Field("DocSec1\\VendorName").Text == "Name1")
{
Document.Field("DocSec1\\VendorName").Text = "Name1";
}
else if(Document.Field("DocSec1\\VendorName").Text == "Name2")
{
Document.Field("DocSec1\\VendorName").Text = "Name2";
}

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.