Answered Multiple views in Infopath 2007/2010

  • mardi 10 avril 2012 18:40
     
     

    I'm creating an InfoPath 2007 form in Infopath designer 2010 and following are the details:

    Person #1 initiates the request and sees View #1. They submit to InfoPath form library and an email goes to Person #2. That person opens up the form and sees View #2 that allows them to add their approval, notes and then there is a submit button for them.

    Scenario1: Person#2 should be able to see the part of the form submitted by person#1 but cannot edit it. It should be disabled.

    Scenario 2: And when the request is approved, person#1 should see the complete form but will not edit it. Only Person#2 should be able to edit it.

    Scenario 3: How to open a web page on a button click from the form?

    I created a third view and when person#2 submits the form, it switches to third view but I’m not sure how to make it read only for person#1. If I change the third view as read only, then person#2 cannot edit it.

    Any suggestions or advice please?


    • Modifié fadnan mardi 10 avril 2012 19:06 changes
    •  

Toutes les réponses

  • mercredi 11 avril 2012 13:37
     
     Traitée

    You need to add GetUserProfileByName data connection. For it you will get logged in person account name. On the basis of account you can then switch views.

    Scenario 1: You need to make all fields read only for specific user. Add condition to every editable field. If Person 1 then read-only.

    Scenario 2: Same as 1.

    Scenario 3: You need to create Hyperlink to open a link : http://social.msdn.microsoft.com/Forums/pl-PL/sharepointinfopath/thread/aba57fea-e0a2-42b0-b862-1406ce353f0d

    You cannot make a view readonly for specific user.


    Dare to promise

    • Marqué comme réponse fadnan lundi 16 avril 2012 22:04
    •  
  • mercredi 11 avril 2012 14:12
     
     

    If you are using rules for Opening the form anyway, how about a rule which switches to a read-only view if CurrentUser <> Person 2, using the GetUserProfileByName?

    Here, we just have a duplicate view with Expression boxes instead of editable fields.

  • mercredi 11 avril 2012 14:37
     
     
    Thanks D-Virdi, when you say GetUserProfileByDataName data connection, is it Web service method? The form is browser enabled, so i don't see the hyperlink control. What do you suggest?
  • mercredi 11 avril 2012 15:05
     
     

    Hi,

    GetUserProfileByName is webservice. See Clayton's blog for more details: http://claytoncobb.wordpress.com/tag/getuserprofilebyname/

    hyperlink is fully supported in browser enabled form :http://office.microsoft.com/en-us/infopath-help/web-browser-compatibility-in-infopath-forms-services-HA010204085.aspx

    You might be missing something.


    Dare to promise

  • mercredi 11 avril 2012 16:05
     
     
    Thanks D-Virdi, I'm using Infopath designer 2010 to create this form, I don't see the Hyperlink control in Controls option:http://office.microsoft.com/en-us/infopath-help/infopath-2010-features-unavailable-in-web-browser-forms-HA101732796.aspx
  • mercredi 11 avril 2012 16:06
     
     
    Thanks Joanne, Can i store the Value in Calculated Filed to SharePoint list?
  • lundi 16 avril 2012 22:05
     
     
    Your solution worked; thanks for the suggestion.