SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a form with two views, one view has all fields like title, date, subject, country, Yes/No and state. The other view only has date and Yes/No (a checkbox).

On the first view all fields are required but if the user selects the second view only tilte and date should be required. My issue is that if I add required rules on the first form the fields that are not present on the second view still are required. I tried to add a condition like required if state is present but on the second view where it is not present it is still required.

Any ideas?

Thanks in advance.

share|improve this question
Can you re-phrase your question? It is currently not comprehensible, First, you tell about views of the same form, then about separate "the first form". Does the phrase "if the user selects the second view only tilte and date should be required" mean that required Title should be filled on another separate , first, view whaen a user fills the second view? Then, you write contradicting phrases about "only tilte and date" required and further theat "state" is required when on 2nd view – Gennady Vanin Геннадий Ванин Jul 8 '12 at 15:03

Check the field properties on InfoPath2010(and also on SharePointDesigner2010). On the properties, AllowNullValues must be unchecked. After that, you can use rules to set field's requirements.

share|improve this answer

With form services you can't use validation rules.

The approach I've used in the past is have a defined "Null" value. So if you don't need a "Subject" value you still populated it with something like "NA". In your form you use rules to set the content. I prefer to keep them in the Submit section prior to save, so I would check if Subject has a value and if not I set it to "NA". So now you can set the fields as required on the form and regardless of view they have to fill in only the fields you show, and the form logic fills in the rest.

Now, if you don't like seeing these "NA" or "999", etc values in your list, you can edit the list view in SharePoint Designer and add formatting rules that can remove rendering of values if they equal whatever it is you chose.

share|improve this answer

Your Answer


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.