Community

Table iteration using script in document definition

Can anyone help me how to iterate through table using script in document definition? I want to use replace method to change values of one column of extracted table.

0

Comments

4 comments

  • Avatar
    liyamenons

     

    That before, when you have been prepared to Best Review Geek show your creation, your equitable alternative would gather numerous inventive individuals with printouts utilizing their compositions notwithstanding carry them with each other in a similar spot. A few scholars despite everything scrutinize by doing this – sitting yourself down together around a bistro kitchen table or extraordinary room. The responses they get and the associations they make are their very own critical piece individual composing presence.

     

    0
  • Avatar
    Vladimir Dimitrijevic

    Hi Vivek,

    I hope that you have already found the solution. Anyway, when creating rule, don’t forget to uncheck read-only in Rule Settings tab, for column that you want to change. Sample code to iterate whole table can be similar to this:

    // Jscript
    for (i = 0; i < this.Field("YourColumnName").Items.Count; i++) {
        this.Field("YourColumnName").Items.Item(i).Value = this.Field("YourColumnName").Items.Item(i).Value.replace(/[^0-9]/g, ''); 
    }

    Best regards,
    Vladimir

    1
  • Avatar
    VivekRaj

    Thanks Vladimir for your quick response. It worked fine.

    Can we delete row from table based on field value using iteration script?

    0
  • Avatar
    Vladimir Dimitrijevic

    Hi,

    You're welcome. To delete a row, please refer to this topic: http://www.capturedocs.com/thread/3035-how-to-remove-recognized-lineitems/

    Best regards,
    Vladimir

    0

Please sign in to leave a comment.