Tuesday, March 2, 2010

Auto increment number of repeating section infopath

If you have created the repeating section or table in your infopath form and want to index it with the auto increment number to the each row or section then here is the easiest way to do it without taking any coding efforts..

1. Open your infopath form.
2. Add an column named is Sr. No.in your repeating table/section.
3. Add a textbox control in the column.
4. Right click on textbox say Textbox Properties.
5. Simply add the following formula to the Default Value field,

count(../preceding-sibling::*[local-name() = "YourRepeatingGroupName"])

6. Replace "YourRepeatingGroupName" with your own repeating group name.
7. Say ok to all save and preview it!!
8. It will work like viola!!!!!!!!!!!!!!!!!

No comments:

Post a Comment