Question

List A has an approval workflow running behind.

List A has columns "x","y" and "z" as mandatory fields.

Approvals are sent to "user1" then "user2" and finally "user3".

The creator of the list item fills the columns x,y and z and submits the item which triggers the approval workflow.

The following functionality is needed

User1 gets the email to approve, but it should be mandatory for him to fill columns "p","q" and "r" before he approves the item.

User 2 then gets to approve but it should be mandatory for him to fill the columns "l","m" and "s" .

Can this be achieved using SharePoint designer 2010.

The whole scenario is also based on SharePoint 2010. Is there any workaround for this.

Was it helpful?

Solution

This is a good use case for InfoPath. IP has "rules" that enable to do things like enable/disable or show/hide fields based on a condition, or make fields required based on a condition. So you could put fields l, m, and s in a section, and configure the section to only be visible when the form has a certain status (the status would be a field set up in the form that would change for each step of the workflow). Those fields could also be marked to be required only when the status is a certain value.

You could do all of the above with SPD, but that would require javascript or XSL. The XSL might not be too bad in SPD 2010, but when you migrate to 2013, maintinging this form would become far more difficult. So I'd go the infopath route.

edit: Another, easier option I should have mentioned earlier is to use list validation. This is found in list settings --> validation settings. You can configure simple expressions, like [amount]>0, or you can use if statements. For example:

=IF([stage]="submitted",if([somefield]<>"",true,false),true)

In the above, if the stage field has a value of "submitted", then it checks the value of "somefield". If somefield is not empty, then the validation passes (true), else the validation fails (false). if the stage wasn't "submitted", then the validation passes (the last true).

An additional option would be to customize the editform.aspx page, and add javascript to conditionally make the field required.

OTHER TIPS

While infopath is one way to go, I personally would prefer to use content types instead. It would be a 100% OOTB way to handle your request (as opposed ot infopath that has a somewhat questionable future).

Simply create one content type with the required fields (mandatory or not depending on the use case) for each approver and have the workflow change the content type before moving on to the next approver.

If you want to up the ante a bit you hide the "Change content type" field on the edit form in order to prevent the users from changing this.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top