Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / September 2005

Tip: Looking for answers? Try searching our database.

Prevent Duplicate Rows in Repeating Table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tim Philomeno - 16 Sep 2005 21:54 GMT
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.
Greg Collins [InfoPath MVP] - 16 Sep 2005 23:31 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.