Best practice for handling validation in multiple views - InfoPath Dev
in

InfoPath Dev

Best practice for handling validation in multiple views

Last post 12-22-2008 12:17 AM by kalaicompute. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 12-18-2008 03:03 AM

    Best practice for handling validation in multiple views

    Hi all,

         Can some one tell me the best way to handle validation when there are multiple views in the form?

         Actually my form has mutiple views. When submitting the form in browser mode, it shows the validation error one by one, but if we submit the same using InfoPath client, it throws all the validation errors at the same time.

        Any suggestion to handle this in better way will be greatly appreciated.

     Thanks,

    Kalai.

    Kalai
    http://www.ilink-systems.com
  • 12-19-2008 04:51 AM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: Best practice for handling validation in multiple views

    Hello,

    We can add ‘*' symbol mark as expression box for each required field. For this expression we have to add conditional formatting to show / hide depends on your validation condition. In InfoPath UI we can understand whichever ‘*' mark symbols have fields are validation in that form.

  • 12-21-2008 10:41 PM In reply to

    Re: Best practice for handling validation in multiple views

    Thanks Shiva.

    Actually my expectation is something different. I have 10 different views and I am currently in first view. I am submitting the form now. If there are some validation errors in 2nd and 4th views, it shows the validation error in 2nd view only first. After correcting it, it shows the next. So, I would like to know how can we show the entire list of validation errors while submitting the form.

    Kalai
    http://www.ilink-systems.com
  • 12-21-2008 10:58 PM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: Best practice for handling validation in multiple views

    Hello,

    How your validations are showing using rules or code? Do you have any code for Submit button then you have to get those error nodes in code. Using the below code you will get all errors in your form,

    var errors = XDocument.Errors;

    From this list you can prepare the node list which have the validation and give the alert message to user.

    One more option is user will get those validation field names using Tools -> Go to Next Error. It will give the list of fields have validation in your form.

  • 12-22-2008 12:17 AM In reply to

    Re: Best practice for handling validation in multiple views

    Hi,

           I have used rules for all the validations and submition as well. I have no code used for submitting the form so far. As you said, we can navigate to next error field by using Tools -> Go to Next Error. But my concern is how to do the same kind for IPFS browser.

     Thanks.

    Kalai
    http://www.ilink-systems.com
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.