1

I have a custom infopath form linked to a custom document library. When the form is populated and submitted, the document library then stores the submitted form.

When clicking on the item link, it takes you to the "Edit" page.

In the InfoPath form, I have created a custom "Read Only" view which is activated when the workflow is complete. The problem I am facing is that users can change the view from a drop down found on the top ribbon. See image below:

enter image description here

How can I disable this so that users can't modify their items once it is approved and completed?

Btw, I have SharePoint 2010 Enterprise and InfoPath 2010.

2 Answers 2

3

Current view dropdown from ribbon can be hidden through current view created in InfoPath.

See this link and follow the steps: http://ovaisashraf.blogspot.in/2011/02/hide-current-view-dropdown-from-ribbon.html

Note: It will hide only current view dropdown i.e. other views will have view dropdown in ribbon.

1
  • Nice! never realized that property setting was there. Commented Oct 15, 2014 at 0:33
1

I don't think this is possible from InfoPath rule perspective. There are some convulated methods for setting up lists with groups and checking that in your info-path form on load or page change and controlling which page actually is seen.

I would probably just look at embedding some JavaScript on the page (either directly in the page via SPD or with a content editor webpart) that hides the control in the ribbon. If you use a library like SPServices you can check the permissions a user has thus dynamically control it's visibility.

An example of checking if a user is in a group - you could then use to control the showing and hiding of the ribbon control by dynamically changing it's CSS properties.

Source:

http://sympmarc.com/2010/01/29/determining-if-a-user-is-in-a-permission-group-with-sharepoints-web-services/

$(document).ready(function() {

   $().SPServices({
     operation: "GetGroupCollectionFromUser",
     userLoginName: $().SPServices.SPGetCurrentUser(),
     async: false,
     completefunc: function(xData, Status) {
        if($(xData.responseXML).find("Group[Name='GroupNameHere']").length == 1)
        {
           ... do something ...
        }
      }
   });
});

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.