Data validation and blank cells - InfoPath Dev
in

InfoPath Dev

Data validation and blank cells

Last post 10-12-2007 02:34 PM by adamrharding. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 10-11-2007 07:04 AM

    Data validation and blank cells

    Hi there,

    I've done a search but can't find this question being asked before, although I'm sure it will have as it seems very basic. 

    Is there any way to perform data validation on fields when they are not blank, but allow them to be submitted if left blank? I have lots of optional sections in my form, but wish to check the data entered where appropriate, so I have lots of data validated cells, most of which will be blank on any one form submitted.

    I hope this makes sense!  I would be grateful if anyone can let me know how to do this.

    Thanks in advance

    Jo

  • 10-12-2007 01:16 AM In reply to

    Re: Data validation and blank cells

    Hi Jo

    The idea you are trying to implement is actually moderately simple.  If I give you one example I am sure you will be able to apply it wholesale.

    Field 1 and Field 2 are my only fields

    I want to validate the entry on Field 1 but not stop people from submitting the form if left blank

    My validation will read something like:  Where @Field 1 is not blank AND where @Field 1 does not match pattern "custom pattern" \d\d\d\d\d\d\d represents a seven-digit number.  This way if @Field 1 is blank no validation applies, if however it is completed it has to have 7 digits in it.

    FYI the custom pattern screen details all manner of different characters to build your own special pattern for the field.

    I hope this helps

    Adam Harding
    Wales
    UK
  • 10-12-2007 10:18 AM In reply to

    Re: Data validation and blank cells

    Thanks Adam. I had actually tried this but thought it hadn't worked. I've tried it again now and realise it didn't work because of another field I'd forgotten I'd put validation on. So it seems to work fine now, thanks so much for your help.

    Jo

  • 10-12-2007 02:34 PM In reply to

    Re: Data validation and blank cells

    No problem glad to be of assistance
    Adam Harding
    Wales
    UK
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.