Table iteration using script in document definition

  • 92 Views
  • Last Post 2 weeks ago
VivekRaj posted this 4 weeks ago

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.

Order By: Standard | Newest | Votes
liyamenons posted this 4 weeks ago

 

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.

 

Vladimir.Dimitrijevic posted this 2 weeks ago

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

  • Liked by
  • VivekRaj
VivekRaj posted this 2 weeks ago

Thanks Vladimir for your quick response. It worked fine.

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

Vladimir.Dimitrijevic posted this 2 weeks ago

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

Close