Posts

Showing posts from 2018

Restrict InfoPath Section Visibility Based on User in SharePoint

Image
Restrict InfoPath Section Visibility Based on User https://social.technet.microsoft.com/wiki/contents/articles/32515.restrict-infopath-section-visibility-based-on-user.aspx --------------------------- Applies To: SharePoint/InfoPath List Forms Introduction Sometimes we need to restrict sections in forms to a certain group of users. Instead of simply marking them with a heading such as " HR Use Only " or " Information Services Use Only ", we can show or hide a section based on the logged in user. This article describes how to achieve that in InfoPath. Table of Contents Introduction Creating the Lists Create the User List Customizing the List Form Create the List Customize the list in InfoPath Manage the Data Connections Create the Rules ​Creating the Lists In order to restrict sections in a form, we will need to create a list that contains the users who will have access to the section. We will reference this li

Showing the records ID on the View and Edit forms in sharepoint

– Go to the List – Add /DispForm.aspx?ToolPaneView=2 to the URL This will open the page in editable form and the add a content editor webpart. Edit it to add the HTML content. – Add for example a ContentEditorWebPart and paste in the script below; You can do the same thing with EditForm aswell. <script type= "text/javascript"     src= " http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js " > </script> <script type= "text/javascript" >   $( function () {    // Get the ID from the query string    var id = getQueryString()[ "ID" ];      // Find the form's main table    var table = $('table.ms-formtable ');      // Add a row with the ID in    table.prepend("<tr><td class=' ms-formlabel '><h3 class=' ms-standardheader '>ID</h3></td>" +                  "<td class=' ms-formbody '>" + id +