Mandatory fields - InfoPath Dev
in

InfoPath Dev

Mandatory fields

Last post 10-10-2005 07:35 PM by franck. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 10-10-2005 12:48 AM

    Mandatory fields

    Gday,

    Given the following scenario:
    Department has many Teachers

    Department mandatory fields include - Dept ID, Dept Name
    Teachers mandatory fields include - Teacher ID, Teacher Name

    How do i change fields settings or form settings so that department details can be entered without having to fill out the mandatory fields for the teachers. But if the user does fill out teachets details then perform validation. Would i need to create separate form (This is last resort, really need these two tables on the one form)?

    regards.
  • 10-10-2005 06:27 AM In reply to

    Hi,

    Are all your fields on the same View? Department data + details / Teachers + details?
    At what point do you try to submit?

    Regards,

    Franck Dauché
  • 10-10-2005 04:21 PM In reply to

    Hi Franck,

    Yes, all the details will stored on the one view. Im planning to have just a single button to SUBMIT details(Ideal scenario). Or should i create two buttons, one to submit dept and the other to submit teachers details?

    Regards
    a.
  • 10-10-2005 06:43 PM In reply to

    Hi,

    In that case, what triggers the validation that you don't want? I am confused here.

    Regards,

    Franck Dauché
  • 10-10-2005 07:30 PM In reply to

    One of the first things I read when learning InfoPath is that regardless of which view the user is looking at, all schema validations must be met in order to submit. This is because the form is bound to the rules of the entire schema.

    One way I found to get around this was not put the most generic business rules into the schema definition but the do scripting validation based on view that is currently visible. So instead of making a field like teacher id not allowed to be empty in the data source, I would write code that would check for a teacher id based on the view that is currently visibile. If the teacher id were blank, I would then add an error to the errors collection which would disable the submit button.
    Jason
    http://www.k2distillery.com/
  • 10-10-2005 07:35 PM In reply to

    Yes, vt, that's why I asked if everything was one 1 view and it seems to be. So, validation should happen only during Submit.
    Am I missing something here absMing? How many views total in your form?

    Regards,

    Franck Dauché
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.