Community

Document section Problem

Hello everybody
I create a document definition. this have many document section and each document section has checkmark group.

My export script receive value of check group of every document section.
but after process will display as picture.

In picture I select Document section sec2.

Abbyy has function/method to check about document section has or not first?

Thank you
0

Comments

7 comments

  • Avatar
    Timur
    Hello

    This might happen if first section is not present in the document so during export you are trying to access a field that doesn't exist or if there are several document sections of the same type, then you have to additionaly specify field instance: ... Item(i).Value

    In order to avoid accessing fields that don't exist, try using .IsMatched property, you can also loop through document sections to check which ones are present and adjust your export.

    Regards
    Tim



    0
  • Avatar
    laptorkung
    Hello

    This might happen if first section is not present in the document so during export you are trying to access a field that doesn't exist or if there are several document sections of the same type, then you have to additionaly specify field instance: ... Item(i).Value

    In order to avoid accessing fields that don't exist, try using .IsMatched property, you can also loop through document sections to check which ones are present and adjust your export.

    Regards
    Tim





    Hi Tim
    Thank you for your answer.
    Do you give me about script example? I already search about IsMatched but not have any example code about this.

    Regards
    James
    0
  • Avatar
    Timur
    Hello,
    Can you please provide your test project where this issue occurs for analysis?


    Regards,
    Tim
    0
  • Avatar
    laptorkung
    Hello,
    I can not provide for you.

    Thank you for your help.

    Regards
    James
    0
  • Avatar
    Timur
    isMatched is usually used the following way:

    this.Field("Name").ismatched

    returns a bool variable

    Regards
    Tim

    0
  • Avatar
    laptorkung
    isMatched is usually used the following way:

    this.Field("Name").ismatched

    returns a bool variable

    Regards
    Tim


    Thank you Tim

    I already try it but same error.
    This method for Export script yes or no?

    Regards
    James
    0
  • Avatar
    Timur
    The answer is actually more simple

    Error is in the way the field is accessed.

    When you have miltiple document sections fields are accessed in the following way:
    this.Field("Sec1[0]\dropdown..").Text

    Note that there is alot diffrences in how fields are accessed in diffrent programming languages. In order to find a correct way to access a field consider using a debugger, to do so just add a break point command and test your export in a local copy of your project.

    Regards
    Tim






    0

Please sign in to leave a comment.