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'm following this article to create custom forms for workflow tasks.

At one point the article says:

If you are well versed with InfoPath 2010, you can create views in the same form for the various tasks that we have in our workflow. Alternatively, you can create a new form for each task and add it to the solution in a similar manner.

If I were to create more views in the same form, how would I then specify the view to use for a task? I can specify the form with:

this.myTask_TaskProperties.TaskType = 1; // 2, 3 ...

But how would I specify the view (form + view from the form)?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

But how would I specify the view (form + view from the form)?

Answer: You don't! The following code is sufficient:

this.myTask_TaskProperties.TaskType = 1; // 2, 3 ...

To select the view you add a "Rule" inside the form (on form load, button click, whatever...) with a "Switch Views" action and select the view based on some condition/button click.

share|improve this answer

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.