I have a repeating table of tasks. Each has a TaskNo. I want to prevent the
user from entering duplicate TaskNos...I am struggling with trying to write a
"IsTaskDup" function by spining through the rows...cant' tell when I am on
the current row, etc....
Has anyone done this type of operation?
Thanks in advance!
Tim Philomeno, Sparling, Inc.
The first step is to get the TaskNo of the current row.
The you go to the parent and do a selectNodes("TaskNo"). This gets a list of all the TaskNo nodes.
From there you can loop through and verify whether there are dups.
Just watch for the scenario of thinking the row you are on is a dup of itself. You can probably arrange it that when you do your selectNodes you filter out the current row position by getting a count of the preceding-siblings.

Signature
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com
I have a repeating table of tasks. Each has a TaskNo. I want to prevent the
user from entering duplicate TaskNos...I am struggling with trying to write a
"IsTaskDup" function by spining through the rows...cant' tell when I am on
the current row, etc....
Has anyone done this type of operation?
Thanks in advance!
Tim Philomeno, Sparling, Inc.