Data Validation - Field Required Based on Repeating Dropdown - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Data Validation - Field Required Based on Repeating Dropdown

Last post 05-29-2013 09:23 AM by Jen B. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-29-2013 08:59 AM

    Data Validation - Field Required Based on Repeating Dropdown

    Hi all,

    I've tried to search for a similar post before writing this up, but cannot find one.  My apologies if this particular question has already been answered.  I'm in IP 2010 and using a filler form, not form services.

    I have a repeating dropdown called MetricsSource that pulls and filters options from a sharepoint list and a text field called Metrics Details.  Currently, I have the validation set up so that Metrics Details is a required field if a choice is made in Metrics Source, unless the choice is N/A.  Works fine.  Now, however, there is another possible choice that would make the Metrics Details field not required as well.  That would be fine as well, IF the submitter could only make one choice.  However, I need the Metrics Details field to be required if more than one choice is made.

    As an example:  We'll say if the person ONLY chooses Apple in the Metric Source repeating dropdown, then Metric Details is not required.  But, if the person chooses Apple and Orange or Apple and banana or Apple, Grape, Orange, etc. then Metric Details IS required.

    My original rule was required if:
    - Metric Details is blank -and-
    - All occurrences of Metric Source are not equal to N/A

    This worked because no one will choose another option when choosing N/A.  Obviously, if I add "and All occurrences of Metric Source are not equal to Apple", I can make the Metric Details field not required, but I need to it be required when another choice is made.

    I added the "all occurrences are not equal to apple" and I tried adding a second validation using the "Number of occurrences of Metric Source are great than or equal to 2" hoping it would add a validation, but it didn't work.  I can't find documentation on using the option of Number of Occurrences for a repeating field, so not sure if that was the intention or not.  I also tried Sum of Occurrences just to make sure that wouldn't work since I presumed it required number fields..and it didn't.

    Anyone have an idea of how I can do this?  I'm sure there should be an easy way to do it, but I'm just not figuring it out.

    Thanks!

    Jen

  • 05-29-2013 09:23 AM In reply to

    Re: Data Validation - Field Required Based on Repeating Dropdown

    Nevermind!  I hadn't entered the screen tip so it wasn't providing the required asterisk!  Ugh!

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