Thursday, November 24, 2016

Query String (URL) Filter Web part

The web part is very useful to display the list results based on filters applied. You can create a page in Site Pages library. Add list view web part to the page and below that add 'Query String (URL) Filter ' Web Part below that. In Web Part settings for Query String (URL) Filter Web part, specify the column for which you need to apply filter.

Follow the below links
https://support.office.com/en-us/article/Connect-a-Query-String-URL-Filter-Web-Part-to-another-Web-Part-8fd0107f-4889-451b-a7f7-d1996e12a8d1?ui=en-US&rs=en-US&ad=US&fromAR=1

Wednesday, November 23, 2016

Read value of controls in SharePoint form

Hi folks,

I got a pre-defined function which helps to read value of controls in SharePoint form. To find a control in SharePoint from client side Javascript we normally use the getTagFromIdentifierAndTitle function.

function getTagFromIdentifierAndTitle(tagName, identifier, title) {
   var len = identifier.length;
   var tags = document.getElementsByTagName(tagName);
    
   for (var i = 0; i < tags.length; i++) {
  var tempString = tags[i].id;
 if (tags[i].title == title && (identifier == "" || 
          tempString.indexOf(identifier) == tempString.length - len))
        {
           return tags[i];
 }
   }
   return null;
}
Tag is the html tag used to define the control, Identifier is the type of the control and title is the name of the control. Below are basic tag and identifiers of the server side controls.
Control                 Tag               Identifier
Panel                 div  
Label                 label  
Button                 input               button
Link Button         href  
Hyperlink         href  
Image Button         input               image
Textbox                 input               text
Textbox (Password) input               password
Textbox (Multiline) Input               textarea
DropDownList         select  
Listbox                 select  
RadioButton         input               radio
Checkbox         input               checkbox
File                 input               file

Please find the link below for more information
https://workflowssimplified.wordpress.com/2011/09/15/gettagfromidentifierandtitle-function/