data validation - InfoPath Dev
in

InfoPath Dev

data validation

Last post 05-30-2006 02:50 PM by WickedShark. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 05-30-2006 08:59 AM

    data validation

    Hi

    I need help with data validation. I have a list of simple yes/no/na drop down boxes for questions. I want valdiation to require a comment if the user selects No from the drop down list. Thre is a text box for comments next to the drop down list. Can someone help me out.

    Thanks
  • 05-30-2006 09:48 AM In reply to

    Hi Donovan,

    I think the following steps will help you:

    1. Double-click the comment node in the data source task pane.
    2. Click the Data Validation tab.
    3. Click Add, and then add this data validation:

    [_DropDown_List_] [is equal to] [No] [ and ]
    [_Name_of_comment_Node_] [is blank]

    4. Type a message into the two boxes below, and then click OK until all dialog boxes are closed.

    I hope this helps!
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 05-30-2006 10:00 AM In reply to

    Hi WickedShark,

    Here is one way you can do this:

    1) hide the text box for comments if the user selects anything other than no (right click on text box field and select "conditional formatting". You can then hide the control using a test on the value of your drop down list box value)

    2) make sure that the value of the the text box cannot be left blank by the user: right click on text box field, choose text box properties and under "Validation & Rules" choose "cannot be blank").

    4) Make a rule on the drop down list box to set the value of the text box comments depending upon the selection. If the user selects yes/na you will need to add some filler text into that text box so that the user won't be prompted to enter text since the text box field can't be submitted with a blank value (I suggest putting some text in there that will indicate what selection the user chose so you know this message is from the form and not something the user put in there). Also it would be a good idea to add a rule that when the user selects "No" that the value of the text box for comments gets cleared out (fileds value = "") This will help with your overall validation of that field.

    Make sense? Post back if this is not clear enough, it's a pretty simple process.
  • 05-30-2006 02:50 PM In reply to

    Hi guys thanks I can use both of these answers at different points of my forms
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.