Switching views after submit - InfoPath Dev
in

InfoPath Dev

Now you can find InfoPathDev on YouTube and Twitter!

Switching views after submit

Last post 05-07-2009 01:42 AM by bizzle. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 02-14-2008 02:30 AM

    • wintert
    • Top 500 Contributor
      Male
    • Joined on 06-26-2007
    • Kfar Vitkin
    • Posts 29

    Switching views after submit

    Hello all.

    I have an InfoPath form with 3 views: User View, Manager1 View and Manager2 View.

    The 3 views are different.

    In the form library, when the user press on new, the form is opening and he fills it out.

    i want that when he press on submit, the form will be saved in the form library (that is not a problem) and i want the view to be changed to to Manager1 View.

    after that, a workflow will run on the form library that will recognize that a user filled out the form and submitted it (that's not a problem either).

    Then, i want the Manager 1 to open the same form and see the Manager 1 View, then, he press on Agree and the form will be submitted to the form library again and change the view to Manager2 View.

    Then, after Manger 2 opens the form and fills it and then submit the form and that's it.

    That's the scenario :)

    How do i make a submit button (or a button) that changes the view so when the form opens up again, the user/manager will see his view?

    Any ideas ?

    Filed under: , ,
  • 02-14-2008 06:18 AM In reply to

    Re: Switching views after submit

    How I handle this is by assigning a value to a text box on submit. Then using the open option rules to open the appropriate view.

     Example: ViewID (text box that holds value that corresponds with a particular view)

    So in your case I would default set ViewID = 1 for User View, then on first submit assign the value = 2 for Manager 1 view, and then after manager 1 submits assign vallue = 3 and then depending on what the final view of the document is, after the second manager approves/disapproves document you can assign it back to 1 or to a new view(Final view =4).

     After you set that up you want to go to the open rules and set conditions.  If ViewID=1 then open user View, If ViewID=2 then open Manager 1, If ViewID =3 then open Manager.

     You can then use those numbers for other items in your form, such as hiding or revealing certain items depending on who is viewing what.  You could further go by if you just have one manager you could compare current user by who that manager is and that will only allow that manager to view it.  Roles would also work for this.

    As a side note, After manager 1 approves/rejects document, I would use the check to open to Manager2 by using If approved and equal to 3 open Manager 2.

     

     

  • 02-18-2008 04:43 AM In reply to

    • wintert
    • Top 500 Contributor
      Male
    • Joined on 06-26-2007
    • Kfar Vitkin
    • Posts 29

    Re: Switching views after submit

    Thanks man.

    I tried it and it works fine.

    When i will get the logic of everything, everything will be better :)

    Thank you very much

  • 02-20-2008 01:29 PM In reply to

    • dpsol
    • Not Ranked
    • Joined on 02-20-2008
    • Posts 2

    Re: Switching views after submit

    barmatt80:

    How I handle this is by assigning a value to a text box on submit. Then using the open option rules to open the appropriate view.

     Example: ViewID (text box that holds value that corresponds with a particular view)

    So in your case I would default set ViewID = 1 for User View, then on first submit assign the value = 2 for Manager 1 view, and then after manager 1 submits assign vallue = 3 and then depending on what the final view of the document is, after the second manager approves/disapproves document you can assign it back to 1 or to a new view(Final view =4).

     After you set that up you want to go to the open rules and set conditions.  If ViewID=1 then open user View, If ViewID=2 then open Manager 1, If ViewID =3 then open Manager.

     You can then use those numbers for other items in your form, such as hiding or revealing certain items depending on who is viewing what.  You could further go by if you just have one manager you could compare current user by who that manager is and that will only allow that manager to view it.  Roles would also work for this.

    As a side note, After manager 1 approves/rejects document, I would use the check to open to Manager2 by using If approved and equal to 3 open Manager 2.

     Hi,

    I am working on something like this and I am trying to follow your instructions. On the third paragraph, how do you assign the text field to "2" when the submit button is pressed?  

    thanks!

     

     -Sol 

     

     

  • 02-21-2008 01:43 AM In reply to

    • wintert
    • Top 500 Contributor
      Male
    • Joined on 06-26-2007
    • Kfar Vitkin
    • Posts 29

    Re: Switching views after submit

    Just press on the SUBMIT button and press on RULES and create a rule to set a value of a field as ...

    You have conditions and actions.

    Don't give any condition and in actions press ADD, there you have all kind of actions: close the form, query and etc.

    One of them is: set a field value.

    Look into it, u will get it :)

    Goodluck

  • 06-02-2008 10:10 PM In reply to

    Re: Switching views after submit

    I am very new to infopath and working on similar kind of scenario.

    i followed the steps as you said, but struck at the point 'form open rules and set conditions'..

    Where can i find this? and how can i make form to open accordingly.?

    please  help me out.
     

     


     

  • 06-03-2008 06:33 PM In reply to

    Re: Switching views after submit

    the form open rules are under the menu bar.  I forget which one as I am at home, but it is the secondd or third menu option from the right side.  Click it a menu will drop down and then click form Options.  A new screen will open and a button will be there that says open or on open.  Click that and it will give you the options to create rules just like any other control in the form.

     

    If you need more clarification, once i get to work in 12 hours, I will post a pic.

  • 10-22-2008 03:50 AM In reply to

    Re: Switching views after submit

    Hi
    I need a help - Please help me
    Advance thanks

    This is regarding infopath views.
    Now in my form having 5 views, User enter datas in all views, then submit the form in the last view. Its working fine. I used Swicth view and move one view to another.

    Now they need Submit datas in all views.
    For Example:
    The user enter data in first view and Submit the data, it should Submit data and move to second view. Then enter data for Second view and Submit it. this time the user close the form.

    Next time they open the same form it should show the thrid view for enter data

    Please Guide me, How i fix this issue.
    once again thanks

    Regards
    Jenkins

    Filed under:
  • 10-23-2008 01:39 AM In reply to

    Re: Switching views after submit

    I got the Solution

    Thanks a lot to everyone

    Filed under:
  • 05-07-2009 01:42 AM In reply to

    Re: Switching views after submit

    Hello, Thanks for the info. I tried it and it worked but have an issue. In outlook 2007, it's possible to preview a message before opening it. When user2 sees the form in the preview pane, he sees what user 1 only should see but when he opens the form he sees what user 2 should see. Please advise on how I can resolve this. Thanks
Page 1 of 1 (10 items)
Copyright © 2003-2010 Qdabra Software. All rights reserved.
View our Terms of Use.