infopath-2007

how to check row already exist in repeating table in infopath?


Hello I have repeating table on my infopath form. It is bound with xml file through web service. my form have submit button. I am able to submit data from infopath for to xml document via web service. I want to validate my repeating table to avoid duplicate records. how to do this validation. ? please guide me I am new for this.


Solution

  • You must use validation rule.

    1. You must select specific field of repeating table.
    2. Add validation rule to it.
    3. Select the expression and add rule:

       ../my:fzScopeName = ../preceding-sibling::my:fzItem/my:fzScopeName
      

      or

      ../my:fzScopeName = ../following-sibling::my:fzItem/my:fzScopeName
      

    Note that: My field name is fzScopeName and fzItem is parent it, as same repeating table structure. see this image