locked
Infopath View as Workflow RRS feed

  • Question

  • Hi I have 1 infopath Form having 3 Views in it.

    I am using the following code to switch the views

    if(application.user.username="someuser")

    ViewInfos.SwitchView(view2)

    I have 1 Form Library (the above infopath form is published) and 1 Task List(for triggering the workflow)

     

    How can I use the form library and the Task List in a Workflow by switching the views

     

    Thnx


    Like Cricket
    • Moved by Mike Walsh FIN Monday, April 4, 2011 2:26 PM surely either InfoPath or Workflow. Moving to workflow forum (From:SharePoint - Development and Programming (pre-SharePoint 2010))
    Monday, April 4, 2011 2:00 PM

Answers

  • Hi,

    Are you talking about Infopath Task forms or the form which you have published in a form library?

    You can switch views based on a particular logged in user or you can switch views when a value gets changed. For changing the Infopath views, you do not have to use a workflow as you can do this without code.

    For eg : Suppose there is a requirement that once the document gets approved or rejected then the view should change to read only. For this, first you need to create a read only view and then have to apply some rules. Once this is done, the Infopath form will always get open in read only mode whenever it is approved or rejected.

    This is just a small example. If you need any further help then please let me know.

    Regards

    Ginni - Microsoft Community Contributor

    [My SharePoint Blog]

    • Marked as answer by David HM Thursday, May 5, 2011 8:20 AM
    Tuesday, April 5, 2011 7:14 AM

All replies

  • can you plz elaborate

    "How can I use the form library and the Task List in a Workflow by switching the views"


    Dare to promise
    Monday, April 4, 2011 3:53 PM
  • Hi,

    What is your requirement and when do you want to switch the views?

    Regards

    Ginni - Microsoft Community Contributor

    [My SharePoint Blog]

    Monday, April 4, 2011 7:01 PM
  • Hi,

    Are you talking about Infopath Task forms or the form which you have published in a form library?

    You can switch views based on a particular logged in user or you can switch views when a value gets changed. For changing the Infopath views, you do not have to use a workflow as you can do this without code.

    For eg : Suppose there is a requirement that once the document gets approved or rejected then the view should change to read only. For this, first you need to create a read only view and then have to apply some rules. Once this is done, the Infopath form will always get open in read only mode whenever it is approved or rejected.

    This is just a small example. If you need any further help then please let me know.

    Regards

    Ginni - Microsoft Community Contributor

    [My SharePoint Blog]

    • Marked as answer by David HM Thursday, May 5, 2011 8:20 AM
    Tuesday, April 5, 2011 7:14 AM
  • Naa,

    I got what you are asking @D-virdi

    I have the question open myself from ages.

    @Ginni: i think what he means is when you click submit or something.... no doubt infopath form saves the fields, creates a new workflow task, etc

    but main problem in SharePoint's basic way of handling things is YOU NEED TO GO ON TASK FORMS ON TASKS LIST and click approve, reject, submit, etc to actually PUSH THE WORKFLOW FORWARD.

    Infopath on its own only triggers creation of workflow review activity, but reviwing takes place on edit form of a task list.

    If you click APPROVE, you move forward and yet another activity is created. if you click REJECT then workflow stops or kills itself.

    but it always involves going back and forth between infopath forms and task lists.

    I exactly know what you are asking Virdi.. i have yet not got any blog good enough with example showing if THIS SCENARIO  can be handled only through infopath form on library and no tasks and task list.

    Only thing i can logically think of, at this point, is may be you write an event handler on the form library and when data change happens through infopath, use event handler to grab that workflow and push it forward yourself, like do what task form would do for you using .NET/SharePoint object model.


    new to every thing
    Tuesday, May 10, 2011 9:28 PM