Field Validation on a complex Browser Form with Sharepoint 2010 - InfoPath Dev
in

InfoPath Dev

Field Validation on a complex Browser Form with Sharepoint 2010

Last post 03-26-2014 04:21 AM by ph0b0s101. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 03-21-2014 07:33 AM

    Field Validation on a complex Browser Form with Sharepoint 2010

    Hello, this is my first thread in this forum. I have used the search but i cound'nt find a thread which will help me with my question / problem. If there is a thread i haven't found please tell me the thread. Ok first I want to give you a short summary of the forms and the used sharepoint 2010 enviroment. I think its better to know to answer the question(s). I have created some forms which uses data connections "GetUserProfileByName"-Service and a Sharepoint Bib for sending the form. The final forms will be published in a sharepoint 2010 site collection, where the users are able to find and open the forms. Furthermore each from will start a approval process (workflows). All this functionallity will work pretty well but we run in a "simple" validation error when the user fill out the form. The Problem: I use many sections in each form and i activate or deactivate sections by conditions. Each condition is bundled with radiobuttons. So there are 3 different values for this radiobutton. For example if radiobutton has the value "edit" than activate section "edit", if radiobutton has the value "create" than show the section "create" and hide the section "edit". In each section there are many fields the user have to fill with the needed information. So each field has a field validation which become active when the radiobutton (in this example the value is "edit" and the field itself is empty. This is working pretty well. But i run in problems, when the user is chaning his mind and change the radio button from "edit" in "create". Then I have the following scenario: the user has choosen the radiobutton "edit" and the edit section will open. So the field validation for all fields in the section "edit" becomes active but than the user swtiches to the "create" radiobutton and the section "create" will open (and "edit" will be hidden) and starts also the field validation for the fields in this section. This means that the fieldvalidation for the "edit" and "create" section are active but the user will only see the "create" section. Finally the user becomes a error message when he tries to submit the form. Is there a easy way to deactivate all fieldvalidations for hidden fields / sections? Maybe views or something like that? Ok its also possible with extra validation rules for each field but then i have to create another 100 rules for each form to reset the field validation for each field which is hidden. I hope its clear what my problem is, my english isn't the best but i tried my best :-) Feedback is much appricated. Best regards Christian PS: If needed i could create a short video demonstration of the error.
  • 03-23-2014 09:04 PM In reply to

    Re: Field Validation on a complex Browser Form with Sharepoint 2010

    Hi,

    Thanks for the very precise description of the issue - not bad at all! :)

    I understand that you're allowing users to toggle between radio buttons to get to the corresponding section, and that validation should clear in the non-selected sections to be able to submit the form. If this is correct and if you're saying that your data validation rules have conditions based on the selected radio button's value, they should work correctly if the user toggles to another radio button. I've attached a simple form I've thrown showing how to do this correctly. Please look at it and let me know if it addresses your issues. 

    One more thing, if you're using InfoPath 2010 or 2013 to design your forms, you can make use of the handy feature for copying and pasting rules. Believe me this will save you a lot of time as you won't need to recreate your rules for every single field.

    Hope this helps.

    Cheers!

    Mel Clemente
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

  • 03-24-2014 12:49 AM In reply to

    Re: Field Validation on a complex Browser Form with Sharepoint 2010

    Hi, Thanks for your pretty quick response and your dummy form :-) This is exactly the way I do my field validation. This will work pretty well when only one level of sections are in the form. In my case there are more sections nested. I will attach the form, so you can see my "creation" :-) The aim for me is, that all fields with validation will be reseted (for both not visible sections), when the user changes the "main"- radio button from on to the other. I hope it is better understandable if you may look at the attached form. Hm... maybe i have an idea :) When the user switches the "main"- radio button from on to the other then i should only reset the radio button controls for the nested sections. Best regards Christian
  • 03-26-2014 04:00 AM In reply to

    Re: Field Validation on a complex Browser Form with Sharepoint 2010

    Hi - my apologies but I don't really understand German so I couldn't read the logic in your form. :)

    Anyway, are you saying the my suggested method does not work? Hmm, looking at only the radio buttons in your form, I see that the field is named Accountaktion and that it has three options: Einrichten, Ändern and Deaktivieren. What I was suggesting was that you'd use value selected in the radio button as a condition in your data validation rules. For example, one condition can be if the Accountaktion = "Einrichten" and NameAntragsteller is blank, then display an error.

    And I see you're already doing this for most of the fields in your form. You just need to add the same logic in your other fields that depend on the selected radio button's value.

    Mel Clemente
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

  • 03-26-2014 04:21 AM In reply to

    Re: Field Validation on a complex Browser Form with Sharepoint 2010

    Hi, my idea has solved my problem with the field validation for the nested sections. I have simply added 3 action rules to the "Accountaktion" field for each state the field has. Then i used the "set value of a field" function to reset all radio buttons which controlls the nested sections. The result is as expected and has solved my problem :-) Thank you very much for your support :-) Best regards Christian
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.