Meeting unique validation requirements for content types in the same list

Meeting unique validation requirements for content types in the same list.
We can create seperate forms for each content type using InfoPath. It’s pretty easy. However, you cannot customize New/Edit/View forms with InfoPath. You can, however, use SPD and ListView WebPart. That will be the topic for another post.

So, first I’ve set up my Tasks list to have an extra content type (ignore the summary task – I will). I have the Task content type, which is out-of-the-box. I also have a Simple Task content type, which has Task as the parent. I’ve added a new field, called Owner. That’s the only difference. See List Settings from within IE and then from within SPD.

(sorry for the poor image, WordPress is giving me a headache with it. SimpleTask has an Owner field, Task does not.)

Now go to your Tasks List and click Design Forms in InfoPath. Select the content type you wish to modify. I’ll demo a custom InfoPath form for my SimpleTask content type.

Here are my changes to the form (I’ve added a blue title and made the Owner field red to bring attention to it):

Using the InfoPath client Backstage area, found under File tab, the form is published to the list.

This message indicates all went well.

Now, in the web browser, selecting a new SimpleTask from the New Item menu will display the newly customized form.

Here is the customized Simple Task content type form.

A customized Task form can also be created.

Here is the customized Task content type form.

Now let’s make the Task more complicated in validation. Let’s create a rule that says the “Due Date” is required when a “Start Date” is provided.

After publishing the Task form and starting to fill out a new task item, the validation error is revealed.

So, in summary, you can have an InfoPath-customized form for each content type. This works well if you need to validate data differently for each content type. Using InfoPath, we can set our own data validation rules. Since each content type can have its own form, each content type can have its own validation rules.


Tags: , ,

One response to “Meeting unique validation requirements for content types in the same list”

  1. Eliane Arruda (from Brazil) says :

    Hi David! Every time when I edit a list in Infopath Editor the field ‘predecessors’ has changed. I´m not enable to see the buttons ADD and REMOVE anymore. I´ve even tried to creat a new field with the same caracteristics, bu this new field does not shows when I add a new item. Do you know I can I fix it? Thanks in advance.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: