Free Support Forum - aspose.com

FieldMergingArgs and unique bookmark names in the final document

Hi,

I have a own IFieldMergingCallback with put a FormField at the place where the String-Field-Values be placed. So the user later could identify the automaticaly inserted areas optical, there are disable to protect against changes and I could refill if something change in the database.

I use nested MailMerge because there is the need to build up tables.

The textfield name and corresponding bookmarks for identify would be build like this. arg0.getTableName() +""+ arg0.getRecordIndex() +""+arg0.getFieldName()

But because of nesting more then 2 tables these string is not unique over the document, so the bookmarks are missing because of uniqueness. Is there a possiblity to access the “hierarchical regionname” for the actual field?

Thank you.


Hi Babett,


Thanks for your inquiry. I think, to achieve this, you first need to fetch the actual record from your Relational Data Source specified by arg0.getRecordIndex(). You can then determine the parent row ID or get the whole parent record by using ‘data relationships between the two tables’. In this way you can prepend parent record ID to the current child record to generate unique strings for the Bookmarks.

Best Regards,