Document Library Time stamp

Hi,
I have a document library and I have a folder and then the folder contains some files and folders. When I look at the Top parent folder Modified Date, it is always equal to its created date. Is is possible for parent folder to show the latest Modified date
of its containing children?
Thanks 

Hi  ,
According to your description, my understanding is that you need to sync the modified time of child items to its parent folder when the child item updates.
By default, the modified time of child items cannot be synced to its parent folder when the child item updates. For your demand, you can create  an event receiver to update the parent folder’s Modified
value when any its child item updates.
Reference:
http://www.captechconsulting.com/blog/brandon-atkinson/update-sharepoint-list-item-itemupdated-event-without-endless-loop
Best Regards,
Eric
Eric Tao
TechNet Community Support

Similar Messages

  • Document Properties time stamp

    Post Author: Hieu
    CA Forum: crystalreports.com
    The time stamp in Document Properties (such as this one "07-08-08 17:04:50.338") is based on Eastern Time Zone. Is it possible to change this to reflect my local date/time as seen on the bottom of the Crystal Reports XI application? We are in Hawaii, and we don't observe daylight savings. Therefore, our users must remember to calculate a difference of 5 hour or 6 hours depending on Fall/Winter or Spring/Summer, respectively. Quite tedious.
    Also, can you change the 4-digit year instead of only the last 2 digits? When viewers see xx-xx-xx, they tend to first think mm,dd,yy which is not correct. Thanks.

    Post Author: Henry
    CA Forum: crystalreports.com
    Thanks for your suggestions.  We may provide features for end users to set the default timezone and date format in future releases.

  • TSS Document Tracking - Time Stamp Analysis CRM

    Hi,
    Can you please provide me some inputs on Document Processing Life Style/Time Stamp Analysis in CRM, i have included the transaction in TSS Tracking of document in SBIW still the records are not getting captured in CRMD_TSS_DTRACK table. do we need to do any other setting to enable tracking.
    Thanks
    Akila. R

    Finally I am able to find a solution to this problem and now my system is tracking all status changes and providing me detail conveniantely on duration and time between status changes.
    There are some table entries that need to be created plus a couple notes that will help.  This applies to people who are not getting any data whatsoever in their CRMD_TSS_DTRACK table or 0CRM_TSS_DTRACK extractor.
    Goto transaction --> SMW3FDCUST and make the following entries:
    BDoc Type BUS_TRANS_MSG
    Context mBDoc Notification (additional calls)
    Sequence 50
    Service Function CRM_UPLOAD_BW_TSS_DTRACK_SRV
    and
    BDoc Type BUS_TRANS_MSG
    Context mBDoc Notification Multiple (additional calls)
    Sequence 50
    Service Function CRM_UPLOAD_BW_TSS_DTRACK_SRV
    and
    BDoc Type BUS_TRANS_MSG
    Context mBDoc Initial Load (additional calls)
    Sequence 50
    Service Function CRM_UPLOAD_BW_TSS_DTRACK_SRV
    To also ensure your statuses are being captured after all your configurations have been made, be sure that for these 2 key notes you have the approriate corrections existing in your system:
    1024652 - This ensures your custom statuses groups are captured in table and extractor (once you have enhanced it of course)
    1239530 - Ensures that all status changes are captured according to your configurations

  • How the files are decreasing from RBS storage after some time i delete docs from document library, where shld I check the settings for this?

    HI
    I created a web application and configured  rbs storage ,
    I uploaded documents (for ex: 18 number)
     after uploaded  documents ,  and observed the RBS storage folder, number of files are increasing (39 number) , its working fine
    and also  I run the querys to check the rows increasing or not , (when I upload new doc rows are increased its fine also)
    select count(*) from alldocs
    Select count(*) from AllDocstreams
    but when I delete some docs from document library ,
    1)the doc itself deleted from document library
    2)when I check the rbs storage  there is no number of files are decreased(its still 39 files ), its same as  before doc deleted from doc library
    after some time I found the number of files are decreasing from RBS storage folder in sql server,
    here I want to know the how the files are decreasing from RBS storage  after some time, where  shld I check the settings for this? and how I control on it
    here how I know the settings for cleaning up orphan BLBOS how  these deleted BLOB
    adil

    1. WHen you delete the file from Sharepoint, it is still present in Recycle bin. This is a default setting in sharepoint for 30 days. Once files are deleted fro Recycle bin, it can also be delete from RBS
    2. There is a RBS cleanup job which deletes files from RBS. for more info check 
    http://mehuljamod.blogspot.in/2012/09/remote-blob-storage-maintainer-rbs.html

  • How to change column "Date" from "Text" to "Date-Time" in Document Library.

    How to change column name "Date" from "Single line of Text" to "Date and Time" in Document Library.

    Hi,
    If you would change column type, you might need to re-create column.
    If you would like a text column to display in date format, you could refer to the links below:
    http://sharepoint.stackexchange.com/questions/45774/how-to-convert-date-field-in-single-line-of-text-using-calculated-columns
    http://yasuanantha.blogspot.com/2008/06/to-convert-text-column-to-date-column.html
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Remove the time stamp in a PDF document

    So.... I'm hoping that there's a way to remove the time stamp from a PDF document I'm working on. I can't find it in preferences and a search has been less than fruitful. Any ideas??  Thanks!

    If you use the redaction tool to redact white space and then apply the redaction, it will give you the option to remove all hidden information. That should do what you wish.

  • Remove the comment time stamp in a PDF document

    Does anyone know what's the best way to remove the comment time stamp from a document?
    thanks

    Do you mean that you want to remove the timestamp of a particular comment? If so, there are two timestamps associated with a comment, the creation date and the modified date. The modified date is what's shown in the comments list in Acrobat/Reader and can be altered by a script, but the creation date will still be present though unseen and unmodifiable directly with a script. It's possible to export the comments to a data file (FDF/XFDF), edit the file to remove/replace any timestamp info, and re-import the comments into a copy of the file that doesn't have comments. So the best approach really depends on what it is you're trying to accomplish.

  • What is the size and number of documents we can upload to a document library at one time

    HI
    what is the size and number of documents we can upload to a document library at one time.
    like we have scenario , we developed a custom solution to scan and upload documents to sharepoint sites doc library.
    here we face issues when user try to upload 100 documents with the size of each doc 2-3 MB, at one time.
    adil

    Hi Adil,
    The maximum number and size of documents to upload in a document library is determined by a setting in Central administration. You can go to Central administration -> Application Management -> Manage Web Applications -> Select the Web Application
    -> Click on General Settings in the ribbon. Scroll down and you will see "Maximum Upload Size" section. The maximum value that can be set is 2047 MB. 
    Blog | SharePoint Learnings CodePlex Tools |
    Export Version History To Excel |
    Autocomplete Lookup Field

  • Imported iPhoto library -- Aperture set time stamp for each picture 5 hours

    Very annoying and bizarre -- I imported thousands of pictures, from 3 or 4 different cameras, and all of them have the time stamp 5 hours too early. I'm not worried about time zones, etc. -- even where the camera, computer and file resides in Chicago, and are set to Chicago time, a photo that was taken at 3 PM CST, and says so in iPhoto, says that it was taken at 10 AM CST in Aperture. Is there any easy way to fix this for all of the pictures?

    Hi Sharon,
    There is a way to make a change to the date of all pictures. Select all the pictures that need adjustment, then go to the "Metadata | Adjust Date and Time" function. Aperture will show the time of the first picture, and you can set that time to something else. Aperture determines the delta from current to new timestamp, and applies that same delta to all of the other pictures.
    You are also probably wondering how that happened in the first place. I don't know for sure, but try to import some more pictures, and in the upper right "Import Settings", select "Time Zone" See if the time zones match CST.
    nathan

  • Document library Permission - users/group can add/upload/modify but same time not to see other documents

    Hi,
    I have a question regarding SharePoint document library permission. I am using SharePoint 2013.
    I have 3 SharePoint groups (SP-Group-NL, SP-Group-US & SP-Group-BR).
    I have given the contribute access to all 3 groups in the document library, so that people can with in these group can upload/add/modify document inside it.
    Now I want that people from specific group can only view those document which they uploaded and not all.
    Note - (a) I don't want to use audience targeting. (b) I don't want to right any code.
    Regards,
    Yogendra

    Hi Yogendra,
    Per my understanding, you might want users in a specific group can view only the documents uploaded by themselves.
    In the OOTB list view settings, we can set filter on a list view to only display the documents created by the current user:
    However, if you want this filter only apply to users in a specific group, Audience Targeting or custom code would be required as there is no such OOTB feature in SharePoint
    list can meet this requirement.
    With Audience Targeting, a possible solution is that, we can add two list view web parts into one page, set Audience Targeting on one of them to display only when
    the current user is in the specific group, then modify the view settings to apply filter on this list view web part to make it only display the documents created by current user.
    Thanks 
    Patrick Liang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • VOICE MEMOS and Wrong Time Stamps in Itunes

    I've noticed that my voice memos in the new iTunes 11.1.3 (8) have incorrect time stamps all over them now. This is a real problem for me, since I need the dates that the messages were recorded. I just tested this out by recording a new one today (2/11/14) on my new Iphone 5s. It showed up dated 8/13/12 2:13pm. My phone has the correct date on it, so what gives?
    Any solutions out there?
    Not to mention the fact that there are NUMEROUS DUPLICATES of previous memos that have become weird artifacts in my iTunes library each time I've backed up my materials. AND the new iTunes setup makes it incredibly hard to *actually remove data* from my system. I am concerned my private material is no longer private, but being archived elsewhere for meta-data purposes.
    C'mon, Apple. You're really slipping.

    I see all timezones, have you tried setting the time/date manually? I'd do than, then pop an email to support.
    Norwegian and a BB/PB user. Read what I mean, not what I spell.

  • How do I show/refresh data from an Access Web App in an Excel spreadsheet saved in a Document Library on Sharepoint 2013 online

    I have an Access 2013 Web App in my Sharepoint 2013 online website. It contains a query to report on its data (several, actually, but let's keep it simple). I want to connect an Excel spreadsheet to the query, visualise the data in pivot tables/graphs/whatever,
    save the spreadsheet in a Document Library, and let other team site Sharepoint users open the spreadsheet (preferably in Excel online, but with Excel client if it has to be) and see/copy the data, refreshed with the latest information from the Access Web App.
    Simple, surely!
    The way I'm doing it at the moment is to create an ODC file to connect to the cloud-based Access 2013 database, save that ODC in a Data Connection Library in the SP site, and use the saved ODC file as data source in the Excel spreadsheet. This works and
    successfully keeps everything 'in the cloud' but I can't get it to refresh in Excel Online, and if I open the spreadsheet in Excel Client I have to enter the database password every time to refresh it. I don't really want to issue this password to everyone
    who might want to view the data. There must be a better way than this ODC method, I suspect.
    Googlings on this have led down various blind alleys - Excel Services, PowerPivots, Web Parts - but I'm stuck on which to follow through. Please, someone, point me to an article/book/website that explains how to do this step-by-step in simple language..
    thanks
    Jonathan

    I don't see any quick way of achieving it - at least there's no such functionality exists in SharePoint. All you can do, develop an event receiver that will update the fields in the list item once the excel file is added/updated. You can use OpenXml API
    to manipulate the excel file.
    Thanks,
    Sohel Rana
    http://ranaictiu-technicalblog.blogspot.com

  • How to Get Choices as a Dropdown from a different Column for the same Item In a Document Library?

    Hello All,
    I was trying to see if there is any way that we can get the choices for a Field from another filed in the same item in a Document Library.
    To be specific.
    I have Created a Project Document Set, Which has a Column called "Project Members" where all the members will be listed. This will be inherited to all the documents in that Project Document Set. This is used to grant Permission using Workflow.
    I also have "Document Members" Column(This is only for Documents) who will be given Edit permissions to that Document using a Workflow. This can be any type of column(choice, People or Group etc) As long as I can select multiple values.
    I am looking for a way to get the "Project Members"(Values or Users) as choices for "Document Members". I know this is possible in the List as you can customize in the InfoPath Form. But not sure in the Document Library.
    Document Members can only be the members from the Project Members, In order to grant granular Permissions for the project And Documents using a Workflow
    Document Library
    Project Document Set Name
    File Name
    Project Members
    Document Members
    Project A
    User1;User2;User3
    Doc1
    User1;User2;User4
    User1;
    Doc2
    User1;User2;User5
    User1;User2;
    Doc3
    User1;User2;User6
    User1;User2;User3;
    Project B
    User5;User6;User7;
    Doc1
    User5;User6;User7;
    User7;User5
    Doc2
    User5;User6;User7;
    User7;User5
    Doc3
    User5;User6;User7;
    User5;User6;User7;
    Thanks for your time.

    >
    Jenny Karunakaran wrote:
    > Hi Jung,
    >
    > Thanks for the reply. But I dont know how to assign value set to this attribute(i.e. Context atribute to which filter value property is bound). Can I use a supply function for this ?
    >
    >
    > Regards,
    > Jenny
    No. A value set and a supply function are two completely different things. You use this Context API to populate the value set for an attribute:
    IF_WD_CONTEXT_NODE_INFO=>SET_ATTRIBUTE_VALUE_SET
    Value Sets are also how ByKey UI elements (like the DropDownByKey) are built.  Here is a help document that discusses value sets - but in the context of the ByKey UI elements.  The process is the same for creating the value set however:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/bb/69b441b0133531e10000000a155106/frameset.htm

  • Create a new document in Sharepoint Document Library/OneDrive on iPad/Safari

    Hi,
    My users are having trouble creating a new document from OneDrive in Safari on their iPads. The screen goes grey like its going to show the popup to select the new file type, but the popup never comes up. If they clear their cache, it works for exactly 1
    time and then goes back to this behavior. I'm not exactly sure if it worked before and/or when it stopped working. The iPad I have tested was at the latest 8.2 version of IOS and my Sharepoint farm is an On-Prem install of 2013 with SP1 mark2. My WAC farm
    is also 2013 SP1.
    Any suggestions?
    Thanks,
    Matt

    Hi,
    I understand you are suffering the issue when create a document in Sharepoint Document Library/OneDrive on  iPad.
    According to the official article
    https://technet.microsoft.com/en-us/library/fp161353.aspx?f=255&MSPPError=-2147217396, the version of your iOS should be in the supported list. I guess the issue may start after you installed an update, and if there is any other version (low versions)
    of iPads in your company, please use a different version device to test the issue.
    Meanwhile, to determine whether the issue is related to your SharePoint environment, I suggest you just to register an Office 365 trail account, and test the issue with SharePoint Online. In case the same issue happens with SharePoint Online, the issue should
    be related to your client device, and my next suggestion is to contact support of your device manufacture.
    Once you need any help from SharePoint end, please don’t hesitate to come back, and we are always happy to support you.
    Best Regards,
    Lisa Chen
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Grouping by a Metadata Column in a SharePoint Document Library

    Hi All,
    I have a document library with a managed metadata column. Now I need to create a view in which i need to group by the metadata column but I'm not able to see the managed metadata column in the Group By Columns list. Is it possible to accomplish this? Can
    anyone pls help me out. Thank you.

    It's kind of a lot of code... but here goes!
    This all goes into a separate JS file:
    (Tip, to copy this code chunk, it's easiest to start your selection outside the code block)
    var js_MultiFilter = (function () {
    function js_MultiFilter(listName, site) {
    this.document = document; f (typeof listName == "undefined") { listName = 'Documents'; }if (typeof site == "undefined") { this.useCurrentSite = true; }else { this.useCurrentSite = false; }this.listName = listName;this.listRootfolder = "";this.site = site;this.notificationEnabled = true;this.filterFields = []; this.filterNames = []; this.selectModes = []; this.filterValueLists = []; this.displayFields = []; this.displayNames = []; this.displayModes = []; this.items = []; this.potentialFilters = []; this.queryFields = []; this.selectedFilters = []; this.sortField = "Title"; this.sortDesc = false; this.selectMode = "checkbox"; this.filterHeadingClass = "js_MFFilterHeading"; this.filterTableClass = "js_MFFilterTable"; this.filterColumnClass = "js_MFFilterColumn"; this.innerFilterColumnClass = "js_MFInnerFilterColumn"; this.filterCheckboxClass = "js_MFFilterCell"; this.displayOuterClass = "js_MFResultOuter"; this.displayTableClass = "js_MFResultTable"; this.displayRowClass = "js_MFResultRow";
    this.displayHeaderClass = "js_MFResultHeader"; this.displayCellClass = "js_MFResultCell"; this.filterLabelClass = "js_MFFilterLabel"; this.filterLabelHoverClass = "js_MFFilterHoverLabel"; this.filterLabelSelectClass = "js_MFFilterSelectLabel"; this.filterLabelUnusedClass = "js_MFFilterUnusedLabel"; this.resultCountClass = "js_MFResultCount"; this.maxResultHeight = "270px"; this.rowLimit = 100; this.divId; this.evenColumnWidths = true; this.evenFilterColumnWidths = true; this.resultsId = "js_MultiFilterResults1"; this.showMetadataGuids = false; this.maxFilterHeight = 13;
    /*Methods*/ this.containsString = containsString; this.getIndexOf = getIndexOf; this.addDisplayField = addDisplayField; this.addStaticDisplayField = addStaticDisplayField; this.addFilterField = addFilterField; this.bindToDiv = bindToDiv; this.onQuerySucceeded = onQuerySucceeded; this.onQueryFailed = onQueryFailed; this.getValueAsString = getValueAsString; this.showLoading = showLoading; this.removeLoading = removeLoading; this.toggleAndApplyFilter = toggleAndApplyFilter; this.applyFilter = applyFilter; this.insertDefaultCss = insertDefaultCss; this.get_defaultCss = get_defaultCss; this.isPageInEditMode = isPageInEditMode; this.HoverFilterLabel = HoverFilterLabel; this.DeHoverFilterLabel = DeHoverFilterLabel;
    /*Interface Functions*/
    function isPageInEditMode() { return (document.forms[0].elements["MSOLayout_InDesignMode"].value == "1") }
    function addFilterField(fieldName, displayName, selectMode) { if (typeof (displayName) == "undefined") { displayName = fieldName; } if (typeof (selectMode) == "undefined") { selectMode = this.selectMode; } this.filterFields.push(fieldName); this.filterNames.push(displayName); this.selectModes.push(selectMode.toString().toLowerCase()); var filterValueList = []; this.filterValueLists.push(filterValueList); var potFilterValueList = []; this.potentialFilters.push(potFilterValueList); if (!this.containsString(this.queryFields, fieldName)) { this.queryFields.push(fieldName); } }
    function addDisplayField(fieldName, displayName, displayMode) { if (typeof (displayName) == "undefined") { displayName = fieldName; } if (typeof (displayMode) == "undefined") { displayMode = "default"; } this.displayFields.push(fieldName); this.displayNames.push(displayName); this.displayModes.push(displayMode); if (!this.containsString(this.queryFields, fieldName)) { this.queryFields.push(fieldName); } }
    function addStaticDisplayField(displayText, displayName, displayMode) { if (typeof (displayName) == "undefined") { displayName = displayText; } if (typeof (displayMode) == "undefined") { displayMode = "default"; } this.displayFields.push("@" + displayText); this.displayNames.push(displayName); this.displayModes.push(displayMode); }
    function insertDefaultCss(RevertToDefaultStyles) { var js_style = this.document.createElement("style"); js_style.type = "text/css"; document.getElementsByTagName("head")[0].appendChild(js_style); var newCss = this.get_defaultCss(RevertToDefaultStyles); if (typeof js_style.styleSheet != "undefined") { js_style.styleSheet.cssText = newCss; } else { js_style.appendChild(this.document.createTextNode(newCss)); } }
    function bindToDiv(divId) { /* Causes the control to appear in the specified div.*/ if (typeof (divId) != "undefined") { this.divId = divId; } if (this.notificationEnabled) { showLoading(this); } var clientContext; if (this.useCurrentSite) { clientContext = new SP.ClientContext.get_current(); } else { clientContext = new SP.ClientContext(this.site); } var web = clientContext.get_web(); var lists = web.get_lists(); var list = lists.getByTitle(this.listName); var camlQuery = new SP.CamlQuery(); var descending = ""; if (this.sortDesc) { descending = " Ascending='False'"; } var camlString = '<View><Query><OrderBy><FieldRef Name=\'' + this.sortField + '\'' + descending + '/></OrderBy></Query><RowLimit>' + this.rowLimit + '</RowLimit></View>'; camlQuery.set_viewXml(camlString); this.collListItem = list.getItems(camlQuery); var strFields = "ID,"; if (containsString(this.displayModes, "fileref", true)) { strFields += "FileRef," }
    for (var i = 0; i < this.queryFields.length; i++) { strFields += this.queryFields[i] + ","; } strFields = strFields.substring(0, strFields.length - 1); this.listRootfolder = list.get_rootFolder(); clientContext.load(this.listRootfolder); clientContext.load(this.collListItem, "Include(" + strFields + ")"); clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed)); }
    function showLoading(parent) { parent.notifyId = SP.UI.Notify.addNotification("Loading...", true); }
    function removeLoading(parent) { SP.UI.Notify.removeNotification(parent.notifyId); }
    function getValueAsString(fieldValue, activeHyperlinks, showLinkUrl, displayMode, additionalFieldValue) { var localNull = null; if (typeof (displayMode) == "undefined") { displayMode = "default"; } /*wraps hyperlink text in <a> tag*/ if (typeof (activeHyperlinks) == "undefined") { activeHyperlinks = false; } /*causes hyperlinks to display URL by default instead of description*/ if (typeof (showLinkUrl) == "undefined") { showLinkUrl = true; } var returnValue = []; var isArray = false if (typeof (fieldValue) == "object" && fieldValue != localNull) { if (fieldValue[0] != localNull) { if (fieldValue.length) { for (var i = 0; i < fieldValue.length; i++) { returnValue.push(this.getValueAsString(fieldValue[i])); isArray = true; } } } } if (!isArray) { if (fieldIsText(fieldValue)) { if (displayMode.toString().toLowerCase() == "link") { returnValue = '<a href="' + fieldValue + '">' + fieldValue + '</a>'; }
    else if (displayMode.toString().toLowerCase() == "display") { returnValue = '<a href="' + this.listRootfolder.get_serverRelativeUrl() + '/Forms/DispForm.aspx?ID=' + additionalFieldValue + '">' + fieldValue + '</a>'; } else if (displayMode.toString().toLowerCase() == "edit") { returnValue = '<a href="' + this.listRootfolder.get_serverRelativeUrl() + '/Forms/EditForm.aspx?ID=' + additionalFieldValue + '">' + fieldValue + '</a>'; } else if (displayMode.toString().toLowerCase() == "fileref") { returnValue = '<a href="' + additionalFieldValue + '">' + fieldValue + '</a>'; } else { returnValue = fieldValue; } } else { if (fieldValue == localNull) { returnValue = ""; } else { if (fieldIsDate(fieldValue)) { returnValue = fieldValue._toFormattedString(); } else { if (fieldIsHyperlink(fieldValue)) { var desc = fieldValue.get_description(); var url = fieldValue.get_url(); if (showLinkUrl) { if (url != localNull) { returnValue = url; } else { if (desc != localNull) { returnValue = desc; } } }
    else { if (desc != localNull) { returnValue = desc; } else { if (url != localNull) { returnValue = url; } } } if (activeHyperlinks && url != localNull) { returnValue = '<a href="' + url + '">' + returnValue + '</a>'; } } else { if (fieldIsLookup(fieldValue)) { if (displayMode.toString().toLowerCase() == "link") { returnValue = '<a href="' + fieldValue.get_lookupValue() + '">' + fieldValue.get_lookupValue() + '</a>'; } else { if(fieldValue.get_lookupValue() == ""){ /* When doing a lookup count, the lookup ID is used */ returnValue = fieldValue.get_lookupId(); }else{ returnValue = fieldValue.get_lookupValue(); } } } else { returnValue = ""; } } } } } } return returnValue; }
    function onQuerySucceeded(sender, args) { var listItemEnumerator = this.collListItem.getEnumerator(); while (listItemEnumerator.moveNext()) { var oListItem = listItemEnumerator.get_current(); var localNull = null; var item = new Object(); item.filterValues = []; item.displayValues = []; for (var i = 0; i < this.filterFields.length; i++) { var filterValue = []; /*Collect all filter values*/ var rawValue = this.getValueAsString(oListItem.get_item(this.filterFields[i])); if (typeof (rawValue) == "string") { filterValue.push(rawValue); } else { filterValue = rawValue; } for (var k = 0; k < filterValue.length; k++) { /*if this value hasn't been encountered before, add it to our filter value list for this filter field*/ var thisvalue = filterValue[k]; if (this.showMetadataGuids == false) { if (thisvalue.indexOf('|') != -1) { thisvalue = thisvalue.split('|')[0]; } } if (!containsString(this.filterValueLists[i], thisvalue)) { this.filterValueLists[i].push(thisvalue); } } item.filterValues.push(filterValue); }
    for (var j = 0; j < this.displayFields.length; j++) { var initialValue = this.displayFields[j]; if (initialValue.startsWith("@")) { initialValue = initialValue.substring(initialValue.indexOf("@") + 1); } else { initialValue = oListItem.get_item(this.displayFields[j]) } /*Collect all display values*/ if (this.displayModes[j] == "fileref") { var displayValue = this.getValueAsString(initialValue, true, false, this.displayModes[j], oListItem.get_item("FileRef")); } else { var displayValue = this.getValueAsString(initialValue, true, false, this.displayModes[j], oListItem.get_item("ID")); } item.displayValues.push(displayValue); } this.items.push(item); } var filterSelectBoxes = []; for (var i = 0; i < this.filterFields.length; i++) { var selectbox = this.document.createElement("div"); selectbox.className = this.filterColumnClass; selectbox.setAttribute("index", i); var heading = this.document.createElement("div"); heading.className = this.filterHeadingClass;
    heading.innerHTML = this.filterNames[i]; selectbox.appendChild(heading); var columnContainer = document.createElement("div"); selectbox.appendChild(columnContainer); var innerColumns = []; for (var j = 0; j < this.filterValueLists[i].length; j += this.maxFilterHeight) { var innerColumn = document.createElement("div"); innerColumn.className = this.innerFilterColumnClass; innerColumns.push(innerColumn); columnContainer.appendChild(innerColumn); } this.filterValueLists[i].sort(); for (var j = 0; j < this.filterValueLists[i].length; j++) { var input = document.createElement("input"); input.type = this.selectModes[i]; input.className = this.filterCheckboxClass; var checkboxText = this.filterValueLists[i][j]; input.setAttribute("name", this.filterFields[i]); input.id = "js_mf_" + i + "_" + j; var labelid = "label_" + i + "_" + j; input.setAttribute("label", labelid); input.value = checkboxText; var checkboxlabel = document.createTextNode(checkboxText); var checkboxlabelspan = document.createElement("span");
    checkboxlabelspan.className = this.filterLabelClass; checkboxlabelspan.id = labelid; checkboxlabelspan.setAttribute("checkbox", input.id); checkboxlabelspan.appendChild(checkboxlabel); var parent = this;
    /*ADD EVENT HANDLER*/ if (input.addEventListener) { /*chrome, firefox, and new IE*/ input.addEventListener("change", function (element) { parent.applyFilter(element, parent) }); input.addEventListener("click", function (element) { parent.applyFilter(element, parent) }); checkboxlabelspan.addEventListener("click", function (element) { parent.toggleAndApplyFilter(element, parent) }); checkboxlabelspan.addEventListener("mouseenter", function (element) { parent.HoverFilterLabel(element, parent) }); checkboxlabelspan.addEventListener("mouseout", function (element) { parent.DeHoverFilterLabel(element, parent) }); } else { /*legacy internet explorer*/ input.attachEvent("onchange", function (element) { parent.applyFilter(element, parent) }); input.attachEvent("onclick", function (element) { parent.applyFilter(element, parent) }); checkboxlabelspan.attachEvent("onclick", function (element) { parent.toggleAndApplyFilter(element, parent) });
    checkboxlabelspan.attachEvent("onmouseenter", function (element) { parent.HoverFilterLabel(element, parent) }); checkboxlabelspan.attachEvent("onmouseout", function (element) { parent.DeHoverFilterLabel(element, parent) }); } var currentColumnIndex = 0; for (var k = 0; k < innerColumns.length; k++) { if (j >= k * this.maxFilterHeight) currentColumnIndex = k; } var currentColumn = innerColumns[currentColumnIndex]; currentColumn.appendChild(input); currentColumn.appendChild(checkboxlabelspan); currentColumn.appendChild(document.createElement("br")); } filterSelectBoxes.push(selectbox); } var htmlToWrite = document.createElement("div"); htmlToWrite.className = this.filterTableClass; for (var i = 0; i < filterSelectBoxes.length; i++) { htmlToWrite.appendChild(filterSelectBoxes[i]); }
    /*clear the loading image and add our filters*/ document.getElementById(this.divId).innerHTML = ""; document.getElementById(this.divId).appendChild(htmlToWrite);
    /*Create the div to display the results*/ var detailsDiv = document.createElement("div"); detailsDiv.className = this.displayOuterClass; var detailIdstring = "Details"; iterator = 0; var detailsId = detailIdstring + iterator; while (this.document.getElementById(detailsId) != localNull) { iterator = iterator + 1; detailsId = detailIdstring + iterator; } detailsDiv.id = detailsId; this.resultsId = detailsId;
    /*create a div for a row within the results table*/ var detailDiv = document.createElement("div"); detailDiv.className = this.displayRowClass; detailDiv.appendChild(document.createTextNode("<img src='/_layouts/images/loading.gif' />")); detailsDiv.appendChild(detailDiv);
    /*Add the results below the filters*/ document.getElementById(this.divId).appendChild(detailsDiv); for (var i = 0; i < this.filterFields.length; i++) { var selectedFieldArray = []; this.selectedFilters.push(selectedFieldArray); } if (this.notificationEnabled) { this.removeLoading(this); } applyFilter(null, this); }
    function DeHoverFilterLabel(labelel, parent) { var sourcelabel = labelel.srcElement; if (typeof (sourcelabel) == "undefined") { sourcelabel = labelel; } var checkboxid = sourcelabel.getAttribute("checkbox"); var el = document.getElementById(checkboxid); if (el.checked) { sourcelabel.className = parent.filterLabelSelectClass; } else if (sourcelabel.getAttribute("unused") == "unused") { sourcelabel.className = parent.filterLabelUnusedClass; } else { sourcelabel.className = parent.filterLabelClass; } }
    function SelectFilterLabel(labelel, parent) { var sourcelabel = labelel.srcElement; if (typeof (sourcelabel) == "undefined") { sourcelabel = labelel; hover = false; } var checkboxid = sourcelabel.getAttribute("checkbox"); var el = document.getElementById(checkboxid); if (el.checked) { sourcelabel.className = parent.filterLabelSelectClass; } }
    function HoverFilterLabel(labelel, parent) { var sourcelabel = labelel.srcElement; var hover = true; if (typeof (sourcelabel) == "undefined") { sourcelabel = labelel; } var checkboxid = sourcelabel.getAttribute("checkbox"); var el = document.getElementById(checkboxid); if (el.checked) { sourcelabel.className = parent.filterLabelSelectClass; } else if (sourcelabel.getAttribute("unused") == "unused") { sourcelabel.className = parent.filterLabelUnusedClass; } else if (hover) { sourcelabel.className = parent.filterLabelHoverClass; } else { sourcelabel.className = parent.filterLabelClass; } }
    function toggleAndApplyFilter(labelel, parent) { var sourcelabel = labelel.srcElement; if (typeof (sourcelabel) == "undefined") { sourcelabel = labelel; } var checkboxid = sourcelabel.getAttribute("checkbox"); var el = document.getElementById(checkboxid); var select = false; if (el.checked) { el.checked = false; } else { el.checked = true; select = true; } parent.applyFilter(el, parent); if (select) { sourcelabel.className = parent.filterLabelSelectClass; } else { sourcelabel.className = parent.filterLabelHoverClass; } }
    function applyFilter(el, parent) { var localNull = null; var resultcount = 0; if (el != localNull) { var element = el.srcElement; if (typeof (element) == "undefined") { element = el; } SelectFilterLabel(document.getElementById(element.getAttribute("label")), parent); var filter = element.value; var parentNode = element.parentNode; var tempElement = element.parentNode; while (tempElement.getAttribute("index") == localNull) { tempElement = tempElement.parentNode; } var fieldIndex = tempElement.getAttribute("index"); var elements = document.getElementsByName(element.getAttribute("name")); for (var inc = 0; inc < elements.length; inc++) { var thisel = elements[inc]; if (typeof (thisel.getAttribute("label")) != "undefined") { DeHoverFilterLabel(document.getElementById(thisel.getAttribute("label")), parent); } } if (element.checked) {
    if (parent.selectModes[fieldIndex] == "radio") { /*remove all other filters in this field.*/ parent.selectedFilters[fieldIndex] = []; } if (!containsString(parent.selectedFilters[fieldIndex], filter)) { parent.selectedFilters[fieldIndex].push(filter); } } else { var index = getIndexOf(parent.selectedFilters[fieldIndex], filter); if (typeof (index) != "undefined") { parent.selectedFilters[fieldIndex].splice(index, 1); } } } var resultsOuterDiv = document.createElement("div"); resultsOuterDiv.className = parent.displayTableClass; document.getElementById(parent.resultsId).innerHTML = ""; document.getElementById(parent.resultsId).appendChild(resultsOuterDiv); var resultsHeaderDiv = document.createElement("div"); resultsHeaderDiv.className = parent.displayRowClass; for (var i = 0; i < parent.displayNames.length; i++) { var headerCell = document.createElement("div"); headerCell.className = parent.displayHeaderClass; headerCell.innerHTML = parent.displayNames[i]; resultsHeaderDiv.appendChild(headerCell); }
    resultsOuterDiv.appendChild(resultsHeaderDiv); for (var i = 0; i < parent.potentialFilters.length; i++) { parent.potentialFilters[i] = []; /*initialize an array of empty arrays (one per filter)*/ } for (var i = 0; i < parent.items.length; i++) { /*for each item...*/ var itemfields = parent.items[i].filterValues var itemContainsAllSelectedValues = true; for (var j = 0; j < parent.selectedFilters.length; j++) { /*for each filter field*/ for (var k = 0; k < parent.selectedFilters[j].length; k++) { /*for each selected filter value*/ if (parent.selectedFilters[j].length == 0) continue; /*skip it if nothing is selected.*/ var thisvalue = parent.items[i].filterValues[j]; /*check if the item has that value within that field*/ if (!containsString(thisvalue, parent.selectedFilters[j][k], this.showMetadataGuids)) { itemContainsAllSelectedValues = false; break; } if (!itemContainsAllSelectedValues) break; } }
    if (itemContainsAllSelectedValues) { resultcount++; var rowDiv = document.createElement("div"); rowDiv.className = parent.displayRowClass; for (var j = 0; j < parent.items[i].displayValues.length; j++) { var cellDiv = document.createElement("div"); cellDiv.className = parent.displayCellClass; cellDiv.innerHTML = parent.items[i].displayValues[j]; rowDiv.appendChild(cellDiv); } for (var j = 0; j < parent.items[i].filterValues.length; j++) { for (var k = 0; k < parent.items[i].filterValues[j].length; k++) { parent.potentialFilters[j].push(parent.items[i].filterValues[j][k]); } } resultsOuterDiv.appendChild(rowDiv); } } if (resultcount == 0) { var rowDiv = document.createElement("div"); rowDiv.className = parent.displayRowClass; var cellDiv = document.createElement("div"); cellDiv.className = parent.displayCellClass; cellDiv.innerHTML = "No results were found for the specified criteria."; rowDiv.appendChild(cellDiv); resultsOuterDiv.appendChild(rowDiv); }
    /*Stylize dead-end filter options*/ for (var i = 0; i < parent.filterValueLists.length; i++) { for (var j = 0; j < parent.filterValueLists[i].length; j++) { var labelid = "label_" + i + "_" + j; var checkboxid = "js_mf_" + i + "_" + j; var filterCheck = document.getElementById(checkboxid); var fieldValue = parent.filterValueLists[i][j]; var tempElement = filterCheck.parentNode; while (tempElement.getAttribute("index") == localNull) { tempElement = tempElement.parentNode; } var fieldIndex = tempElement.getAttribute("index"); if (!containsString(parent.potentialFilters[fieldIndex], fieldValue, parent.showMetadataGuids)) { document.getElementById(labelid).className = parent.filterLabelUnusedClass; document.getElementById(labelid).setAttribute("unused", "unused"); } else { if (document.getElementById(checkboxid).checked) { document.getElementById(labelid).className = parent.filterLabelSelectClass; } else { document.getElementById(labelid).className = parent.filterLabelClass; }
    document.getElementById(labelid).setAttribute("unused", "false"); } } } var resultCountId = "js_mf_resultcount"; var resultCountDiv; if (document.getElementById(resultCountId) == null) { resultCountDiv = document.createElement("div"); resultCountDiv.id = "js_mf_resultcount"; resultCountDiv.className = parent.resultCountClass; document.getElementById(parent.divId).appendChild(resultCountDiv) } else { resultCountDiv = document.getElementById(resultCountId); } if (resultcount == 1) { resultCountDiv.innerHTML = resultcount + " result"; } else { resultCountDiv.innerHTML = resultcount + " results"; } }
    function onQueryFailed(sender, args) { this.removeLoading(this); this.document.getElementById(this.divId).innerHTML = 'The page was unable to populate the data this time.' + '<br/><span style="color:white">' + args.get_message() + '</span>\n'; }
    function get_defaultCss(useTheseClasses, includeStyleTags) { if (typeof useTheseClasses != "boolean") useTheseClasses = true; if (useTheseClasses) { this.filterHeadingClass = "js_Heading"; this.filterTableClass = "js_MFFilterTable"; this.filterColumnClass = "js_MFFilterColumn"; this.filterCheckboxClass = "js_MFFilterCell"; this.displayOuterClass = "js_MFResultOuter"; this.displayTableClass = "js_MFResultTable"; this.displayRowClass = "js_MFResultRow"; this.displayHeaderClass = "js_MFResultHeader"; this.displayCellClass = "js_MFResultCell"; this.filterLabelClass = "js_MFFilterLabel"; } if (typeof includeStyleTags != "boolean") includeStyleTags = false; var openstyletag = ""; var closestyletag = ""; if (includeStyleTags) { openstyletag = "<style>"; closestyletag = "</style>"; } var leftright_padding = "padding-left:2px;padding-right:2px;"; var tableLayoutFixed = ""; var filterTableLayoutFixed = ""; if (this.evenColumnWidths || this.dockResultHeaders) { tableLayoutFixed = "table-layout:fixed; "; }
    if (this.evenFilterColumnWidths) { filterTableLayoutFixed = "table-layout:fixed; "; } return openstyletag + "." + this.filterHeadingClass + "{font-weight:bold;background:#DDDDDD;text-align:center;}." + this.filterTableClass + "{background:#EEEEEE;display:table;width:100%;"+filterTableLayoutFixed+"}." + this.filterColumnClass + "{ display:table-cell;border-left:1px solid #CCC; border-right:1px solid #CCC;}." + this.filterCheckboxClass + "{padding-left: 5px;}." + this.displayOuterClass + "{height:" + this.maxResultHeight + "; overflow:auto; border:1px solid #CCC;}." + this.displayTableClass + "{display:table; " + tableLayoutFixed + "width:100%; text-align:left;}." + this.displayRowClass + "{width:100%;text-align:left;display:table-row;border-bottom:1px solid #EEEEEE;}." + this.displayHeaderClass + "{background:gray;color:white;display:table-cell; padding:5px; font-weight:bold;}." + this.displayCellClass + "{border-right:solid #CCC 1px; " + "border-left:0px;border-top:0px;border-bottom:1px solid #EEEEEE;"
    + "display:table-cell;padding:5px;}." + this.innerFilterColumnClass + "{float:left;}." + this.filterLabelClass + "{margin:1px; cursor:pointer;" + leftright_padding + "}." + this.filterLabelHoverClass + "{cursor:pointer; margin:1px;text-decoration:underline;" + leftright_padding + "}." + this.filterLabelSelectClass + "{background: #555; color:white; cursor:pointer; border:1px solid #555;" + leftright_padding + "}." + this.filterLabelUnusedClass + "{color:#bbb;margin:1px;cursor:default;" + leftright_padding + "}." + this.resultCountClass + "{text-align:right;font-weight:bold;}" + closestyletag; }
    function fieldIsLookup(field) { return (typeof field.get_lookupValue == 'function'); }
    function fieldIsDate(field) { return (typeof field._toFormattedString == 'function'); }
    function fieldIsHyperlink(field) { return (typeof field.get_url == 'function'); }
    function fieldIsText(field) { return (typeof field == 'string'); }
    /* HELPER FUNCTIONS*/
    /* Helper function to imitate Array.contains() method */ function containsString(strArray, text, showMetadataGuids) { if (typeof (showMetadataGuids) == "undefined") { showMetadataGuids = true; } var contains = false; for (i in strArray) { if (strArray[i] == text) { contains = true; break; } else if (showMetadataGuids == false) { if (strArray[i].indexOf('|') != -1) { if (strArray[i].split('|')[0] == text) { contains = true; break; } } } } return contains; }
    /* Helper function to imitate Array.indexOf() method */ function getIndexOf(strArray, text) { for (i in strArray) { if (strArray[i] == text) return i; } }
    return js_MultiFilter;})();
    Then you can reference the JS file and put the filter control on your page like so:
    <div id="js_MultiFilterExample"><img src="/_layouts/images/loading.gif"/></div>
    <script src="/[wherever you saved your js file]/js_MultiFilter.js"></script>
    <script>
    ExecuteOrDelayUntilScriptLoaded(newInstance, "sp.js");
    function newInstance(){
    var mf = new js_MultiFilter("Library Name"); // pass the list display name
    //// Optional Parameters
    //mf.maxResultHeight = "100%"; // set the max height of the results (default: "270px")
    mf.sortField = "FileLeafRef"; // specify internal name of field to sort results by (default: Title)
    //mf.sortDesc = true; // sort descending (default: false)
    //mf.evenColumnWidths = false; // equal result column widths (disable at own risk) (default: true)
    mf.evenFilterColumnWidths = false; // equal filter column widths (default: true)
    //mf.rowLimit = 500; // increase the result row limit imposed on the query (default: 100)
    //mf.notificationEnabled = false; // show the fly-out Loading notification (default: true)
    //mf.selectMode = "radio"; // Specify the default select mode i.e. checkbox or radio (default: checkbox)
    //mf.showMetadataGuids = true; // Do not trim the GUID suffix from managed metadata filters (default: false)
    //mf.maxFilterHeight = 20 ; // Specify the maximum number of options to display in a column before adding another column (default: 13)
    //// Filter and Display Fields
    mf.addFilterField("Category","Category","radio"); // (internal name, display name (optional), select mode (optional))
    mf.addFilterField("Tags");
    //// addDisplayField() displays an additional field from each list item
    //// addStaticDisplayField() adds a column that displays the same text for every item
    mf.addDisplayField("FileLeafRef","Link to Doc","fileref"); // (internal name, display name (optional), display mode (optional))
    mf.addStaticDisplayField("View Properties","Display Form","display"); // (display text, display name (optional), display mode (optional))
    mf.addDisplayField("Author","Created By");
    mf.addDisplayField("Modified");
    //// Valid display modes are: default (display value as text), link (treat the value as a hyperlink),
    //// display (link to library display form), edit (link to library edit form), and fileref (link to document)
    //// CSS classes used by the control
    //mf.filterHeadingClass = "js_MFFilterHeading";
    //mf.filterTableClass = "js_MFFilterTable";
    //mf.filterColumnClass = "js_MFFilterColumn";
    //mf.filterInnerColumnClass = "js_MFInnerFilterColumn";
    //mf.filterCheckboxClass = "js_MFFilterCell";
    //mf.displayOuterClass = "js_MFResultOuter";
    //mf.displayTableClass = "js_MFResultTable";
    //mf.displayRowClass = "js_MFResultRow";
    //mf.displayHeaderClass = "js_MFResultHeader";
    //mf.displayCellClass = "js_MFResultCell";
    //mf.filterLabelHoverClass = "js_MFFilterHoverLabel";
    //mf.filterLabelSelectClass = "js_MFFilterSelectLabel";
    //mf.filterLabelUnusedClass = "js_MFFilterUnusedLabel";
    //mf.resultCountClass = "js_MFResultCount";
    mf.insertDefaultCss();
    mf.bindToDiv("js_MultiFilterExample");
    </script>
    Uncomment anything you need to change!

Maybe you are looking for

  • I would like know some general questions on ABAP

    Dear sirs, Can anyone explain me about Audit trail........(What is audit trail?) 2.What is the std.prog to change the status from 03 to 12? 3.How to debug idoc? 4.What are the idoc monitoring tools? 5.Idoc enhancement:     - what are the segments you

  • Adobe Photoshop CS5 Crash Upon Start up -

    Greetings, I am having a problem upon the launch of Photoshop CS5. I keep getting the following message: "An unexpected and unrecoverable problem has occurred. Photoshop will now exit" Then I get a little window that is titled:  Microsoft Visual C++

  • PI-sheet process in sap

    Dear all, By using help portal i go through-ed Pi sheet process I understood the  concept of pi sheet process But i am little bit confused how to process this PI sheet in sap Could you please guide me how to process pi sheet in sap? or else any parti

  • Eliminate space in csv file

    Hi I have a script (see below) which runs and spools the information select STU_ID||','||CRSLIST||','||FIRST_NAME||','||SURNAME||','||MID_INITIAL||','||substr(rtrim(STU_ID),-1)||','||STUREF studata from LOC_STUEMAIL where STU_ACT = 'A' order by STU_I

  • Create a procedure which requires displaying information from two tables

    What if we want to create a procedure which requires displaying information from two tables. In this situation, I need to display all the details of an employee from an 'emp' table based on the deptno. and also their salary information which is store