Make field required - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Make field required

Last post 10-28-2009 09:15 PM by warrtalon. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 10-22-2009 07:43 AM

    Make field required

    Hi

     I  am relatively new to InfoPath and I am stuck on quite a simple function which I was able to do but forgotten how. I have an option which I want to make compulsory only if a specific selection is made in a drop down list.

    I have tried to do this using Data Validation and the screentip "cannot be blank" however the option button still remains 'Red' if I make a selection. This is quite frustrating as I originally knew how to do this. I also have a file attachment which must be compulsory if one of the options are selected.

    I have tried this with Data Validation as well and the same thing occurs. The drop down should make a 'Yes' or 'No' option compulsory and if 'Yes' is chosen the file attachment should become compulsory. Should I possibly be using rules instead.

    Thanks
    Tony

  • 10-22-2009 08:01 AM In reply to

     Precisely what settings are you using for the Data Validation?  Please try setting it to something like [dropdownField equals 'yes'] AND [compulsoryField is blank]

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 10-22-2009 08:08 AM In reply to

    Thanks for your assistance. This works for the option button. I just need to set the file attachment. I tried Option equals yes AND attachment is not present however this did not work.

    Thanks again for your help.

  • 10-28-2009 09:15 PM In reply to

    You just have to get your logic correct.  It can be done easily.  When creating data validation logic statements, EXACT syntax is required.  Things like "yes" do not equal "YES" or "Yes" and sometimes aren't the same as "TRUE" or "1" so you have to be very careful.  Do one step at a time and verify that every individual piece works before combining conditions.

    You basically need to say:

    If Dropdown equals <value>

    and Option not equals TRUE (make sure it's a boolean field or get the text exact if not)

    Anyway, I just rigged up a sample file that has all 3 fields with the logic as you described it, I think.  Take a look and see if that helps.

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