none
InfoPath 2010 Switching Views from Display to Edit Item is Not Working RRS feed

  • Question

  • I created an Infopath 2010 Form for a List and then created a couple more views (New View and Display View) using the InfoPath, Page Design, New View option.  In the Display view I added a Picture Button with the intent of being able to switch between the Display View and the Edit Item (default) View, but when you click on the Picture Button in the Display View nothing happens and no error messages are generated.

    Within the Display View, I set the Picture Button Properties as follows: "Action:" was set to "Rules", the "Hide picture button in read only views" was unselected and everything else was left at their default values (did not add any pictures).  I then clicked on the Picture Button to highlight it and from the InfoPath 2010, Home tab, Manage rules option, I set up an Action rule that had a Condition of: "None - rule runs when button is clicked" and a "Run these actions of: "Switch to view: Edit item". 

    After Saving and Publishing the InfoPath List form, I navigated to the List in SharePoint 2010 and opened it in View mode which brings up the Display View form.  When I clicked on the Picture Button in the Display View form nothing happens and no error messages are generated.  Am still fairly new to SharePoint, so perhaps this is not the correct method or I missed a step.  Any suggestions would be appreciated.


    Cheryl
    Tuesday, January 10, 2012 8:07 PM

Answers

  • Hi Emir,

    Thank You so much for all your Help on this - everything is working now - Very Grateful!!

    Steps taken:

    1.  Opened SharePoint Designer 2010 > Selected "All Files" under the Navigation heading > selected "List" option > Selected the List name > Selected List name a 2nd time which then displayed a list of all the .aspx forms associated with my list (New, Edit, Display). 

     Renamed my "displayifs.aspx" form via single right click and selected the Rename option > Right clicked on the "editifs.aspx" form and selected the Copy option > Right clicked the editifs.aspx form a 2nd time and selected the Paste option > Renamed the "editifs_copy(1).aspx" to "displayifs.aspx".  In the Top Action Bar, I selected the SP Designer Refresh option (green circle double arrow symbol).

    2.  I opened up SharePoint > Opened my List > Selected the List option under List Tools in the Ribbon > Selected the "Modify Form Web Parts" Icon in the Ribbon's "Customize List" area > Selected my Display List from the drop down box which opened up the InfoPath Form Web Part > Clicked the triangle on the top right corner of the InfoPath Form Web Part > Selected Edit Web Part > In the "Select the form view to display by default" Views: area I selected my "Display View" from the black arrow drop down list > Ok > and Refreshed.

    Note:  If you make any changes to your InfoPath Display View Form, then you must repeat steps 1 & 2 above.

    To Learn about creating different types of InfoPath forms I used the following link:  http://bernierh.wordpress.com/2010/08/07/customizing-new-edit-and-display-list-forms-using-infopath/


    Cheryl
    • Marked as answer by cvideto Friday, January 20, 2012 9:05 PM
    • Edited by cvideto Friday, February 3, 2012 8:15 PM
    Friday, January 20, 2012 9:02 PM

All replies

  • Is your display view disabled?  If the view was disabled - none of the controls on that view will work.

    Picture buttons are special in that they always show your picture... and it isn't clear when they are disabled or not.


    jliu - johnliu.net - sharepointgurus.net
    Wednesday, January 11, 2012 3:13 AM
  • Hi,

     

    You can by creating your custom read only view and make it the default.

     

    • Open SharePoint Designer
    • Navigate to the list which you’ve customized it to InfoPath
    • Under the Forms section >> Edit the page “displayifs.aspx”.
    • Find the option called “ListFormMode” then give it value “Editable” instated of “ReadOnly“ to be like following :

               ListFormMode="Editable".

    Then save page.

     

    But I would recommend you to use another approach by using OOB Ribbon menu and show (Edit) button instat to custom the Forms options >> Enable "Show InfoPath commands in ribbon or toolbar.

     

    Best Regards,

    Megren | Blog  


    www.megren.net
    • Proposed as answer by Triet M Nguyen Friday, October 19, 2012 10:33 PM
    Wednesday, January 11, 2012 4:36 AM
  • Hi John, Megren,

    Thank You for your replies!!

    John:  I tried to determine if my Display View form was disabled by navigating to the InfoPath 2010 / Page Design tab.  From there I selected the "Display View" and then selected the Properties option, but could not find a setting that told me if the Display View was disabled.  Tried looking at all of the remaining options under each InfoPath Tab, but was unable to find an option that would tell me if the Display View was disabled.  I know I didn't deliberately disable it.  Perahaps you could let me know how to check for the disabled setting?

    Megren:  I opened my List (containing the InfoPath form) in SharePoint Designer 2010 and was able to successfully change the ListFormMode option to "Editable".  However, when I opened up an item in the List using the "View Item" option in SharePoint 2010, the item in the List opened up with my Edit Item View and not the Display View".  I would like the Client's to be able to view an item in the List using the Display View (all Edit Item View instructions and extra processing buttons have been removed) and then allow the Client to switch to the Edit Item View if they need to make any changes. 

    Megren:  Previously, I had unselected the "Show InfoPath commands in Ribbon or toolbar", because I wanted the buttons in the "New View" and the "Edit Item View" to control when/what the Client could do.  If I turn that option back on, then the Ribbon Options (Save, Close, Paste etc.) appear in all my views (New View, Edit Item View, and the Display View) and that was something I was trying to avoid.

    I would still like to get the Display View's Button to work which would allow me to switch to the Edit Item View from the Display View.  If there are any other suggestions, I will certainly try them out.  Thanks Again!

     


    Cheryl
    Wednesday, January 11, 2012 6:02 PM
  • Sorry, I meant if the view was read-only.

    Go display view > properties > general tab > Read-only setting

    If that's checked, then none of the buttons on the page will work, including picture buttons.

     


    jliu - johnliu.net - sharepointgurus.net
    Wednesday, January 11, 2012 9:10 PM
  • I opened the "Display View" in InfoPath 2010 and selected the Properties > General tab options. 

    The current setting is "Show on the View menu when filling out this form".


    Cheryl
    Wednesday, January 11, 2012 9:36 PM
  • Hi cvideto,

    I can reproduce your problem.

    I have a display view (customized) and Edit view (default view), then add a picture button on display view, add switch rule to the button and set it to switch to Edit view. It works before publish to SharePoint, but after publishing to SharePoint, click the picture button, but it seems still stay in display view. This is because in display form page, controls are all set as read only, and please follow Megren.Net’s suggestion to modify ReadOnly to Editable.

    And to open the customized display view from the “view item” option, please

    Browser to displayifs.aspx page > Site Actions > Edit Page > Click the triangle on the top right corner of the InfoPath Form Web Part > Edit Web Part > Select the customized display view for Select the form view to display by default option > OK.

    Let us know if you have any question.

    Best regards,
    Emir


    Emir Liu

    TechNet Community Support

    Thursday, January 12, 2012 7:31 AM
  • Hi Emir,

    Thank you for your responce and help on this!!

    Today, I was able to apply Megren's SP Designer "ListFormMode" change noted above along with the InfoPath Form Web Part change you suggested and was able to successfully switch from the Display View to the Edit View after clicking on the Display View's Picture button!

    I did encounter one additional problem.  After switching from the Display View to the Edit View, the Date Picker Field Calendar Icons will no longer open up the Current Month and allow you to pick a Date value.  In the Display View, I did change all my field properties to "Calculated Value".  I tried changing the Date fields back to a field type of "Date Picker", but that made the Date fields editable in the Display view.   Would you have any suggestions on how I might resolve this issue?

    Thought I should note, when trying to follow your instructions on "Browser to displayifs.aspx page etc.  I opened up SharePoint > navigated to my List's Settings Page > selected the "Modify Form Web Parts" Icon in the Ribbon's "Customize List" area > and selected my Display List from the drop down box which opened up the InfoPath Form Web Part > and then edited the Web Part as instructed.

    All of my Drop Down fields, Rule Logic, and E-Mail Notifications continued to work without any problems when swithcing from the Display View to the Edit View via the Display View's Picture button. 

    I did notice if you make an additional changes in InfoPath to the Display View, then you have to go back into SharePoint Designer and reset the "ListFormMode" back to "Editable" in the List's displayifs.aspx Form.


    Cheryl
    Friday, January 13, 2012 11:54 PM
  • Hi cvideto,

    You can copy the form web part from editifs.aspx to the displayifs.aspx, and select Display view for the form copy form the editifs page, it seems that this form will not prompt error when select date from date picker.

    Best regards,
    Emir


    Emir Liu

    TechNet Community Support

    Thursday, January 19, 2012 11:34 AM
  • Hi Emir,

    Thank You so much for all your Help on this - everything is working now - Very Grateful!!

    Steps taken:

    1.  Opened SharePoint Designer 2010 > Selected "All Files" under the Navigation heading > selected "List" option > Selected the List name > Selected List name a 2nd time which then displayed a list of all the .aspx forms associated with my list (New, Edit, Display). 

     Renamed my "displayifs.aspx" form via single right click and selected the Rename option > Right clicked on the "editifs.aspx" form and selected the Copy option > Right clicked the editifs.aspx form a 2nd time and selected the Paste option > Renamed the "editifs_copy(1).aspx" to "displayifs.aspx".  In the Top Action Bar, I selected the SP Designer Refresh option (green circle double arrow symbol).

    2.  I opened up SharePoint > Opened my List > Selected the List option under List Tools in the Ribbon > Selected the "Modify Form Web Parts" Icon in the Ribbon's "Customize List" area > Selected my Display List from the drop down box which opened up the InfoPath Form Web Part > Clicked the triangle on the top right corner of the InfoPath Form Web Part > Selected Edit Web Part > In the "Select the form view to display by default" Views: area I selected my "Display View" from the black arrow drop down list > Ok > and Refreshed.

    Note:  If you make any changes to your InfoPath Display View Form, then you must repeat steps 1 & 2 above.

    To Learn about creating different types of InfoPath forms I used the following link:  http://bernierh.wordpress.com/2010/08/07/customizing-new-edit-and-display-list-forms-using-infopath/


    Cheryl
    • Marked as answer by cvideto Friday, January 20, 2012 9:05 PM
    • Edited by cvideto Friday, February 3, 2012 8:15 PM
    Friday, January 20, 2012 9:02 PM