How to add serial number during cyclic data crawling

Hello, when I am iteratively using data extraction tables, I would like to add a column of serial numbers after each extraction to identify which data was read in the loop. How should I add the following writing method I tried
屏幕截图 2023-07-25 192437

Hi @Hexiang_Huang

Try this code:

<extract-table get_columns_name='1' get_empty_columns='1' columns_name_source='Longest'>
    <column name='Column-0' attr='text' />
    <column name='Column-1' attr='text' />
    <column name='Column-2' attr='index' value='xh' />
    <column name='Column-3' attr='text' value='mailSubject' />
</extract-table>
  1. In the <extract-table> element, you add the two new columns, ‘Column-2’ and ‘Column-3’.
  2. For ‘Column-2’, you set the attribute to ‘index’ (assuming ‘iindex’ in the original code was a typo) and the value to ‘xh’.
  3. For ‘Column-3’, you set the attribute to ‘text’ and the value to ‘mailSubject’.

Now, when you use this code in your data extraction loop, it should add the ‘Column-2’ and ‘Column-3’ columns after ‘Column-1’, and each iteration will have a unique serial number in ‘Column-2’ and the value ‘mailSubject’ in ‘Column-3’.

Hope it helps!!

Hello, after using the provided code, add columns’ Column-2 ‘and’ Column-3 ‘with empty values and no corresponding values. The’ xh ‘variable is int32, and the’ mailSubject 'variable is String