Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a master list with multiple views associated to it. Each view will have its own InfoPath 2010 form.

I need to have fields required based on the InfoPath form, as opposed to setting them as required in SharePoint 2010. The reason for this is I need the flexibility set a field as required for one View and not required for another.

I know how to set these fields as required, using validation rules, for single line of text fields. However, it looks like the Validation rule is not an option for Choice and Lookup fields.

Does anyone have a way that I can set these Choice/Lookup fields as required within the InfoPath form itself?

share|improve this question

2 Answers 2

Here is an easy on how to do that. Create a hidden field e.g FormStatus. This field will drive all the logic of the form. You should a assign a default value of "New" to this field.

Now as you drive the logic of the form - for instance when someone clicks a submit button to change the view, the value of the FormStatus field should also change to for instance "submitted".

You should use the changed value of the FormStatus for the basis of validation rules of your fields. if you want for instance field1 to be required, then create the following validation rule:

condition Formstatus=Submitted and field1 is Blank

type your description

share|improve this answer

you need to add the fields (choice or Lookup) through UI first and then customize the form and select that field (add the field in the form if needed) and go to properties and make it mandatory through Infopath Designer.

share|improve this answer
    
If I make the field required within InfoPath Designer, won't that translate to SharePoint and make the corresponding SharePoint field required as well? I'm trying to stay away from having SharePoint show the field as required. As an example, I want the field within SharePoint to look as if it is not required, while the InfoPath form itself enforces if the field is actually required or not. Hope that helps clear up my question. –  Jim Shorts Feb 6 '13 at 20:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.