how to enable xml field validation based on dropdown boxes? - InfoPath Dev
in

InfoPath Dev

how to enable xml field validation based on dropdown boxes?

Last post 09-29-2011 08:39 AM by jcmoon. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 09-29-2011 05:31 AM

    how to enable xml field validation based on dropdown boxes?

    Hi! I've got a massive form with 32 different sections that it drops down to as a result of two dropdown boxes. There are fourteen different combinations of schemas within these 32 sections. I have set the required field to 'Cannot Be Blank" to prevent the user from leaving them blank on submit. However, even when the other required fields are not in view when I submit, an error box pops up saying they should not be empty. How do I work around this problem? I have tried adding a rule to each required field, making them valid only for when the dropdowns correspond to those fields, but it doesn't work! Any help here would be greatly appreciated!!! thanks, james
  • 09-29-2011 07:50 AM In reply to

    Re: how to enable xml field validation based on dropdown boxes?

    You will have to use custom validation for this, so your general instinct here was correct. Make sure you no longer have "Cannot be blank" selected for these fields. It doesn't matter if fields are in the view or not - if they are not in a valid state, the form won't submit. What are the validation rules you are trying that don't work? And how are they not working (that is - what is the behavior you are seeing)?

    Hilary Stoupa

  • 09-29-2011 08:12 AM In reply to

    Re: how to enable xml field validation based on dropdown boxes?

    I tried adding a validation rule, which applied only when the drop down boxes put the required fields in view. What custom validation should I do instead? THANKS!
  • 09-29-2011 08:14 AM In reply to

    Re: how to enable xml field validation based on dropdown boxes?

    Hi - I see you replied to the email sent by the forum account alerting you to the response - in the future, you'll want to post replies in the thread.

    You said in email:

    I tried adding a validation rule, which applied only when the drop down boxes put the required fields in view.

    So, the validation rule for each field would have two conditions - one being that the field is blank, the other being that the field bound to the dropdown control was a certain value. Were those the conditions you used? If you like, you can attach your form to a reply forum post (under the Options tab) and let me know what field you have your validation rule on, I can double check it for you.

    Hilary Stoupa

  • 09-29-2011 08:30 AM In reply to

    Re: how to enable xml field validation based on dropdown boxes?

    The form is too big to attach, even when zipped up!! Can you send your email to [email protected], and I'll send it to you via email??
  • 09-29-2011 08:39 AM In reply to

    Re: how to enable xml field validation based on dropdown boxes?

    NO those weren't the conditions, I used. If in drop down 1, affected_stream is set to: Corporate US (PRC) and Drop down 2, request_type is set to: New CC Conditionally formatting only puts the Section Corporate_US_PRC_New_CC_Section in view, which contains a repeating table called Corporate_US_PRC_New_Table, containing several required fields. On one required field: /my:Multiple_Cost_Centers/my:Corporate_US_PRC_New_CC_Section/my:Corporate_US_PRC_New_CC_Group/my:Corporate_US_PRC_New_CC_Table/my:Corporate_US_PRC_New_CC_Valid_From I added a validation rule 1: affected_stream = "Corporate US (PRC)" and validation rule 2: request_type = "New CC" Obviously this is wrong, but i don't quite understand yours... Rule 1 would be that the field is blank? Why? It's required! THANKS!
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.