Symptoms
Invalid procedure call or argument in the Indexing script.
Cause
Mismatch of data types during logical operation.
Resolution
Although indexing attributes have a lot of varieties of their datatypes so it is important to keep in mind that these types can be incompatible with each other.
For example, it is impossible to assign a string value to the attribute of Date type.
The workflow administrator should be aware of typecasting because it is missing in built-in FineReader server interfaces.
The case of the mentioned example can be outplayed by the following piece of code with the usage of the JScript class Date:
//function casts string 12/01/2020 to its date value
function strToDate(S){
DMY = S.split('/');
//or any other separator in the linevar goDate = new Date(Number(DMY[2]), Number(DMY[1]-1), Number(DMY[0]));//format of JS class "Date" is YYYY-MM-DD,in result xml you will see it as "DD-MM-YYYY"
return goDate;
}
Comments
0 comments
Please sign in to leave a comment.