Document Library "Modifed By" is Equal to [Me]
Hi All,
I have one small requirement, we have one Site in that site contain one Document Library, My requirement is who ever upload the documents into that library they want to see just there Documents only, they don't want to see other person
Documents. Who is having Site Collection Administrator access Or Full Control they can see all Documents > How i need to achieve this one Please help me
First i have tried like this way - For Others i have Given Contribute Permissions and then I have given Filter on Default View for that Document Library "Modified by" is Equal to [Me] then who is uploading the document they
are seeing those documents only, but Site Collection Administrator Not able to see the all other documents . Is there any way to achieve this requirement using OOB Feature .
If in case if it is not possible using OOB Feature then give idea on how to develop this one please guys help me..
Thanks,
Venkata.
J V Varaprasad.
Hi,
According to your description, you want to accomplish that the person only could see the documents uploaded by themselves, but site Collection Administrator can see all Documents.
After given Filter on Default View
for that Document Library "Modified by" is Equal to [Me], site Collection Administrator not able to see others’ documents too.
I think you should give Filter on
All document View for that Document Library
"created by" is Equal to [Me] rather than
“Modified by” is Equal to [Me].
For your issue, let your site collection admin
create a personal view that doesn't have this filter applied and make it as the default view.
Best Regards,
Lisa Chen
Similar Messages
-
Document Library set "Title" field automatically equal to "Name" field
Hi,
Is it possible to make Title field in document library automatically fill up with File name field?Three ways you could do this really.
#1 - Write a custom event receiver using .NET
#2 - Write Javascript on the list form to update the field
#3 - Create a custom workflow that kicks in when new items are added or modified and that would set the field
Nikolas Charlebois-Laprade Microsoft Certified Professional Software Engineer and Senior SharePoint Advisor http://nikcharlebois.com -
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! -
Show the last published documents in a view for a document library.
Hello!
At our company we have a document library with many documents. These documents are evolving and are therefore going from major versions to minor versions to major versions again. To be able to get a good overview of the last "official" versions
we would need to have a view that shows the last "Approved" versions of each document (if any approved versions exist). This is basically the same as watching the document library from a user that only own reading access and therefore only sees the
"published" versions.
In our case this view should be used by people that own editing rights as well to the documents.
Is it possible to accomplish this?
I tried to use the tip from the following site: link
The "?IncludeVersions=TRUE"
did not work though.Hi AndersObserve,
I understand that you have a document library that you have enabled content approval(if not, enable it) and versioning, then
you want to create a view to filter major(approved) documents, then you can filter on the ApprovalStatus field. Try to create a new standard view, filter the view when the ApprovalStatus is equal to Approved, then the view will display the published version
document.
Best Regards.
Kelly Chen
TechNet Community Support -
Colunms display in document Library
Hi All,
Is there any way to add a column to a document library which displays " Last Modified By " (metadata) from MS Office files just like the " Author " (metadata) column?
I'm trying to add a column to a document library in SP 2010 which would view the " Last Modified By " from " Related People "
field of MS Office files (Word, Excel, Power Point and Access). The " Modified By " column in SP 2010 only displays the last person's name who uploaded the file and not neccessary modified it.
Cheers,
BradHi Brad,
According to your description, my understanding is that you want to add a column in SharePoint library to store the user who last modified the documents.
Per my knowledge, we cannot add a column to read the Last Modified By of the document by OOB way when uploading the document to SharePoint.
The Modified By column in SharePoint will store the user who last modifies the document after the document is uploaded to the library. When a user modifies the document which has been uploaded to SharePoint, the value of the Modified By column will change
to the user.
Best regards.
Thanks
Victoria Xia
TechNet Community Support -
Email attachments from SSRS email subscription are not being uploaded to an email enabled SharePoint 2013 document library.
I have tested the library using a standard email (with attachment) to the library and this works fine.
I have monitored the drop folder on the server and I can see both emails being picked up in drop and processed by SharePoint. The email sent from a regular email account is uploaded with the attachment, whereas the email sent via SSRS subscription
email is uploaded and the attachment (report) is missing.An update on this. The email when sending from SSRS subscription is received in the library and the attachment is contained within the .EML file uploaded.
The behaviour that I would like from SSRS subscription emails are to just have the document and not the email.
Below is a snippet of the .EML files I quick copied from the Drop folder.
Email attachment snippet sent from SSRS Subscrption:
----boundary_2477_75fa3d73-56de-4948-ad82-6588f3a35b95
Content-Type: application/octet-stream; name="Toilet Usage by Month.docx"
Content-Transfer-Encoding: base64
Content-Dis;
filename="=?utf-8?B?VG9pbGV0IFVzYWdlIGJ5IE1vbnRoLmRvY3g=?="
Content-ID: <10722c0f-749e-4ecb-ac3f-206317bae734>
UEsDBBQAAAAIAEVcbEY4Xh4a5nsAAPJtMQARABwAd29yZC9kb2N1bWVudC54bWwgohgA
KKAUAAAAAAAAAAAAAAAAAAAAAAAAAAAA7N1rr1/XcSforyL4VRooR3vd9to76Kihjto9
I8T2TDvAzFuaPrE1kUiCouxWPv38DyX50nHSniCdyS96bIAUL+d/LnxO7Vq11qr6j//p
v3/x+Qe/fnr75WevX/3lD9qfHz/44OnVy9e/+OzVL//yB1+9+9sfXj/44Mt3L1794sXn
r189/eUPvn768gcf/KeP/uNv/uIXr19+9cXTq3cfPF7h1Zd/8evHH/7q3bs3f/Hhh1++
/NXTFy++/PPXb55ePf7wb1+//eLFu8cv3/7ywy9evP27r9788OXrL968ePfZzz/7/LN3
X3/Yj+P8wbcv8/rxXt+++otvX+KHX3z28u3rL1//7bvnN/mL13/7t5+9fPr2p+/e4os/
5f1+8yaffPshv3+Pj4/l3a++e5Ff/1Pv9tdffP7d3/vNmz/lvf3i7YvfPL6AX3z+zTv6
Email attachment snippet sent from Outlook:
--_004_A4C6DCEDE4346446A79AFF493D278530FB87FA07MELABCDEXA1airp_
Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document;
name="Toilet Usage by Month.docx"
Content-Description: Toilet Usage by Month.docx
Content-Dis; filename="Toilet Usage by Month.docx";
size=76574; creation-date="Thu, 12 Mar 2015 00:41:14 GMT";
modification-date="Thu, 12 Mar 2015 00:41:14 GMT"
Content-Transfer-Encoding: base64
UEsDBBQAAAAIAMJcbEY4Xh4a5nsAAPJtMQARABwAd29yZC9kb2N1bWVudC54bWwgohgAKKAUAAAA
AAAAAAAAAAAAAAAAAAAAAAAA7N1rr1/XcSforyL4VRooR3vd9to76Kihjto9I8T2TDvAzFuaPrE1
kUiCouxWPv38DyX50nHSniCdyS96bIAUL+d/LnxO7Vq11qr6j//pv3/x+Qe/fnr75WevX/3lD9qf
Hz/44OnVy9e/+OzVL//yB1+9+9sfXj/44Mt3L1794sXnr189/eUPvn768gcf/KeP/uNv/uIXr19+
9cXTq3cfPF7h1Zd/8evHH/7q3bs3f/Hhh1++/NXTFy++/PPXb55ePf7wb1+//eLFu8cv3/7ywy9e
vP27r9788OXrL968ePfZzz/7/LN3X3/Yj+P8wbcv8/rxXt+++otvX+KHX3z28u3rL1//7bvnN/mL -
SPD 2010 - How to know if a file with a given name already exists in a document library
Hi,
I've created a workflow using SPD. One of the steps in there is changing the name of the document to a clean name. This workflow fails if a document with this same name already exists in my document library. Is there a way to check in a SPD workflow if
a document with a given name already exists in my document library ?
Marc NemegeerHi,
According to your post, my understanding is that you wanted to know if a file with a given name already exists in a document library.
You can use a SharePoint Designer workflow to achive it.
To test to see if a document exists, you need to use condition:
If Current List:Name equals [%Current Item:Title%].docx
Here is a similar thread for you to take a look at:
http://social.technet.microsoft.com/Forums/en-US/cc227020-ce81-4c08-aee0-a66789d8ad05/test-to-see-if-document-exists?forum=sharepointcustomizationprev
Best Regards,
Linda Li
Linda Li
TechNet Community Support -
Adding hyperlink in Infopath custom list which opens pdf document available in document library
Hi,
I have a custom list(modified in InfoPath 2010) and a document library having 2 pdf documents.
In the Custom list, i have used the attachment option for another field.
How to create a link in the InfoPath list, which when clicked opens the corresponding pdf from the document library?
How to achieve this?
Thank youHi Venkatzeus,
From your description, you have a list and attachments for the list are uploaded to a document library. To display the hyperlink in InfoPath form, you can directly use 2 Hyperlink controls. And give the document' URL in this control using formula.
I’m not sure how you upload the list item attachments to another document library. But make sure you have made a connection between the list item and attachments in document library. Here is an example.
ListTitle ID
Item1 1
Item2 2
Pass the ID to the document library when we create the attachment.
Document Name ItemID
attachment1 for item1 1
attachment2 for item1 1
attachment3 for item2 2
attachment4 for item1 1
attachment5 for item2 2
So here, we can see attachment1, attachment2, attachment4 are item1’s attachments and attachment3, attachment5 are item2’s attachments, because of ItemID.
1. Create a new column for document library, named it DocumentURL.
2. Create a workflow and set to start when new item is created automatically with following action.
Set DocumentURL = http://server/topsite[%Current Item:URL Path%].
3. Custom list form.
1) Add a data connection to receiver data from document library.
2) Insert document library connection as repeating section.
3) Add a hyperlink control within the repeating section (Insert > Hyperlink).
4) Select DocumentURL as the data source for Link To and Display options.
4. Add a formatting rule to the repeating section control.
If ItemID in document data connection is not equal to ID in Main data connection, then hide this control.
5. Done.
Let me know if you have any question.
Thanks & Regards,
Emir
Emir Liu
TechNet Community Support -
How to Copy list item attachment to document library in SharePoint 2010
Hi,
How to Create a folder ("List Item - Title Name") in Document library and copy list items Attachments to the same folder in SharePoint 2010,thanks in advance.
Regards,
Selvan.J
Selvan JHi,
You should first check whether the folder exists in the library, if the folder not exists, then create it.
I had modified the code, you can use the following code snippet to achieve it.
private void EventCopyFileWhenItemCreatedOrUpdated(SPItemEventProperties properties)
SPSite site = new SPSite(http://YourSiteName);
SPWeb web = site.OpenWeb();
SPList doclibList=properties.Web.Lists["YourLibName"];
bool foundFolder = false;
if (doclibList.Folders.Count>0)
foreach (SPListItem fitem in doclibList.Folders)
if (fitem.Title.Equals("FolderA"))
foundFolder = true;
break;
if (foundFolder == false)
SPListItem folder = doclibList.Folders.Add(doclibList.RootFolder.ServerRelativeUrl, SPFileSystemObjectType.Folder,"FolderA");
folder.Update();
string fUrl = doclibList.RootFolder.ServerRelativeUrl+"/FolderA";
SPFolder myLibrary = web.GetFolder(fUrl);
if (properties.ListTitle == "YourListName")
SPListItem sourceItem = properties.ListItem;
properties.Web.AllowUnsafeUpdates = true;
//get the folder with the attachments for the source item
SPFolder sourceItemAttachmentsFolder =
sourceItem.Web.Folders["Lists"].SubFolders[sourceItem.ParentList.Title].SubFolders["Attachments"].SubFolders[sourceItem.ID.ToString()];
//Loop over the attachments, and add them to the target item
foreach (SPFile file in sourceItemAttachmentsFolder.Files)
if (CheckFileNameExist(file.Name , properties) == false)
byte[] binFile = file.OpenBinary();
myLibrary.Files.Add(System.IO.Path.GetFileName(file.Url) , binFile);
private bool CheckFileNameExist(string fileNameInFileAttach, SPItemEventProperties properties)
bool flag = false;
SPList myDocumentLib = properties.Web.Lists["YourLibName"];
SPQuery spQuery = new SPQuery();
SPListItemCollection items = myDocumentLib.GetItems(spQuery);
foreach (SPListItem item in items)
if (fileNameInFileAttach == item["Name"].ToString())
flag = true;
break;
return flag;
Thanks & Regards,
Jason
Jason Guo
TechNet Community Support -
I have a requirement to move the documents from one document library to another document library.
Source Library - DocumentLib
Destination Library - Archive
Archive document library will have folders by fiscal year.
Source documentlibrary has files from year 2012 till date.
Archive folder will have folders by fiscal year -(fiscal year starts from July1st -June 30th )
If the document is created date between 1st July 2012 -June 2013 then move the document to Archive document library and in folder Fiscal Year 2013.
If the document is created date between 1st July 2013 -June 2014 then move the document to Archive document library and in folder Fiscal Year 2014.
The structure of destination document library folder should be same as source document library.
Please find attached the screenshot of the requirement.
Files Type - Excel,pdf,microsoft outlook item
Could we use Sharepoint designer workflow to achive this task?
Any help on this will be appreaciated.Hi Asritha,
According to your description, you want to create a workflow to meet the need.
Per my knowledge, there is no built-in action which can move the documents from the current library to a folder in another library.
I recommend to use the custom activity 'Copy List Item Extended' which need to be downloaded from
http://spdactivities.codeplex.com/.
Please per the steps below to deploy the custom activity to SharePoint:
Download the activity form http://spdactivities.codeplex.com/
Open Dos command prompt.
Browse to the directory that you can access stsadm.exe. The default location in version 3.0 is C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\bin
Type the stsadm commands: stsadm -o addsolution -filename C:\UsefulSPDWorkflowActivities_0.5.0\DP.Sharepoint.Workflow.wsp (“C:\UsefulSPDWorkflowActivities_0.5.0\” is the file path)
Type the stsadm commands: stsadm -o deploysolution -name DP.Sharepoint.Workflow.wsp -allowgacdeployment -force -immediate
Open the Center Administration, Click System Setting->Manage Farm Solution-> dp.sharepoint.workflow.wsp->Deploy to the Web Application.
After that, we can create a workflow to meet the need.
Here is the detailed steps to create the workflow:
Create a workflow associated with the Source Library DocumentLib and set the workflow to start when an item is created.
Select If current item field equals value, change the settings to be If Current Item: Created is greater than 7/1/2012.
Select If current item field equals value, change the settings to be If Current Item: Created is less than 6/30/2013.
Select Copy List Item Extended, change the settings to be Copy item in Current Item to list at Fiscal Year 2013 folder url.
Select Delete Item, change the settings to be Delete Item in Current Item.
Select If current item field equals value, change the settings to be If Current Item: Created is greater than 7/1/2013.
Select If current item field equals value, change the settings to be If Current Item: Created is less than 6/30/2014.
Select Copy List Item Extended, change the settings to be Copy item in Current Item to list at Fiscal Year 2014 folder url.
Select Delete Item, change the settings to be Delete Item in Current Item.
Publish the workflow.
Best regards.
Thanks -
SPMenu Field for sharepoint document library
I have written code where it will show the Sharepoint document library in sp grid view.It
is showing the grid but i want the default spmenu field for the type icon. please see the attached image. Below is the code of mine
private void CreateBoundField(string sDataField, string sHeaderText, bool bReadOnly, SPGridView theGridView)
BoundField field = new BoundField();
field.DataField = sDataField;
field.HeaderText = sHeaderText;
field.HtmlEncode = false;
field.HeaderStyle.ForeColor = ColorTranslator.FromHtml("#808080");
field.HeaderStyle.Font.Names = new string[] { "verdana", "arial", "helvetica", "sans-serif" };
field.ItemStyle.HorizontalAlign = System.Web.UI.WebControls.HorizontalAlign.Center;
if (sHeaderText.ToLower().Equals("type"))
field.ItemStyle.HorizontalAlign = System.Web.UI.WebControls.HorizontalAlign.Center;
field.ItemStyle.Width = Unit.Pixel(35);
field.HeaderStyle.Width = Unit.Pixel(35);
field.ReadOnly = bReadOnly;
if (!bReadOnly)
field.SortExpression = sDataField;
field.Visible = true;
theGridView.Columns.Add(field);
SPGridView gv = new SPGridView();
gv.ID = "gv";
gv.EmptyDataText = "No items found!";
gv.AllowSorting = true;
gv.AllowFiltering = true;
gv.AutoGenerateColumns = false;
gv.EnableSortingAndPagingCallbacks = true;
CreateBoundField("Type", "Type", false, gv);
CreateBoundField("Title", "Title", false, gv);
CreateBoundField("Date", "Date", false, gv);
CreateBoundField("ProcessTask", "ProcessTask", false, gv);
DataTable dt = new DataTable();
SPWeb web = SPContext.Current.Web;
SPListItemCollection items = web.Lists["Shared Documents"].Items;
dt.Columns.Add("Type");
dt.Columns.Add("Title");
dt.Columns.Add("Date");
dt.Columns.Add("ProcessTask");
foreach (SPListItem item in items)
DataRow dr = dt.NewRow();
string value = item["ProcessTask"].ToString();
value = value.Substring(value.LastIndexOf(";#") + 2);
string docicon = SPUtility.ConcatUrls("/_layouts/images",
SPUtility.MapToIcon(item.Web, SPUtility.ConcatUrls(item.Web.Url, item.Url), "", IconSize.Size16));
dr["Type"] = string.Format("<img src='{0}' />", docicon);
dr["Title"] = item.Title;
dr["Date"] = item["Created"].ToString().Split(' ')[0];
dr["ProcessTask"] = value;
dt.Rows.Add(dr);
gv.DataSource = dt;
gv.DataBind();
this.Controls.Add(gv);
SPListItemCollection _GridCollection = SPContext.Current.Web.Lists["Shared Documents"].Items;
DataTable _MyDatabale = _GridCollection.GetDataTable();
gvdetails.DataSource = _MyDatabale;
gvdetails.DataBind();
I want the default menu pop up like the below attached image. Can any one help me to
modify the above code and get me the attached out put.
Thanks,
Sandy.Hi,
According to your post, my understanding is that you wanted to show the SharePoint document library in GridView.
You need to get hold of the SPFile object, which is a property of a ListItem item, and get the ServerRelativeUrl property. Then you need to add code to an <a> tag .
Here is a similar thread for your reference:
http://sharepoint.stackexchange.com/questions/88139/code-download-file-from-doc-icon-image-in-sharepoint-2010
More information:
Bind SharePoint 2010 Document Library to GridView:
http://sppractices.blogspot.com/2013/03/bind-sharepoint-2010-document-library.html
Best Regards,
Linda Li
Linda Li
TechNet Community Support -
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?
ThanksHi ,
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 -
Using Designer to get Document ID in Document Library
I am creating an approval workflow on a document library that auto starts on submitting a document.
What I want to do, besides sending the user a link to view the document, is to actually provide a link to the URL that is used to generated the popup with approval options. I do not need a popup. When you paste the URL popup in the address bar, you
get the page with the correct info.
Here's the URL:
http://.../_Layouts/listform.aspx?PageType=4&ListId={...}&ID=22
The number 22 is what I am trying to get.
In Designer, when i do a look up, I cannot seem to get the ID of the document in the list view.Hi Ogrehulk,
Is the URL the related document in the approval task?
Do you want to put the URL in the email when user gets the task notification?
If yes, we can get the ID of the related document in the Start Approval Process step.
Click Approval in the Start Approval Process step.
Click Change the behavior of a single task under Customization.
Navigate to the step Email task notification to Current Task:Assigned To in When a Task is Pending.
Click Current Task:Assigned To.
Best regards.
Thanks
Victoria Xia
TechNet Community Support -
Error while creating a new report data source in Sharepoint Document library
I installed SSRS(sql server 2012 SP1) in my sharepoint 2013 farm(single server installation).
I have installed SSRS addin for report also.
I created a document library and included the report data source content type, report builder report and report builder model content types. On click of any of these content types i get the below error.
"new Document requires a Microsoft SharePoint Foundation-compatible application and web browser. To add document to document library, click on the 'Upload' button."
I am using windows 7 64-bit operation system with Google chrome and IE 8 64 bit.
Any help would be appreciated.Rakesh, is this an SSRS question?
This doesn't look like Power View.
Thanks!
Ed Price, Azure & Power BI Customer Program Manager (Blog,
Small Basic,
Wiki Ninjas,
Wiki)
Answer an interesting question?
Create a wiki article about it! -
Looking for help with PowerShell script to delete folders in a Document Library
I'd like to create a PowerShell script to delete old folders in a Document library that are over 30 days old. Has anyone created something like this?
Orange County District AttorneyHello Sid:
I am trying to do the same and Iam running the script to delete the subfolders inside a folder but I have some errors.
Could you please take a look?
_______Script________
$web = Get-SPWeb -Identity https://myportal.mydomain.com
$list = $web.GetList("ar_mailingactivity")
$query = New-Object Microsoft.SharePoint.SPQuery
$camlQuery = '<Where><And><Eq><FieldRef Name="ContentType" /><Value Type="Computed">Folder</Value></Eq><Leq><FieldRef Name="Created" /><Value Type="DateTime"><Today OffsetDays="-30" /></Value></Leq></And></Where>'
$query.Query = $camlQuery
$items = $list.GetItems($query)
for ($intIndex = $items.Count - 1; $intIndex -gt -1; $intIndex--)
$items.Delete($intIndex);
________Errors_______
Unable to index into an object of type System.Management.Automation.PSMethod.
At C:\Script.ps1:2 char:22
+ $list =$webGetList <<<< "ar_mailingactivity"]
+ CategoryInfo
:InvalidOperation: (ar_mailingactivity:String) [], RuntimeException
+ FullyQualifiedErrorID
:CannotIndex
You cannot call a method on a null-valued expression.
At c:\Script.ps1:6 char:24
+ $items = $list.GetItems <<<< ($query)
+ CategoryInfo
:InvalidOperation: (GetItems:String) [], RuntimeException
+ FullyQualifiedErrorID
:InvokeMethodOnNull
Maybe you are looking for
-
Cant add printer to homegroup HP G72-B66 Windows 7 Had issue with Windows update
The printer is installed, but will not let me share with the homegroup
-
How do I delete a sparse bundle in Time Machine?
I backup two computers over a home wireless network to a Time Capsule. But there are three TM sparsebundles on the TC; one is from a computer that is long gone. I need to create space on the TC as I got an error message stating that; I have a new dis
-
2013 iMac running Mac OS 10.8.4 & FF 23.0.1. When I attempt to access a site (usually a city government site) that requires Java, the applet runs, but the content fails to appear. Sometimes if I play with the various plugins, close FF and restart it,
-
BOBJ Verssion for Spend Performance Management
Hi Gurus, To install SPM, is there any prerequisit of BOBJ version also, or this is a standalone software on BW? Thanks, Sajjad.
-
REFRESH ALV WITHOUT ABAP OBJECTS
Hi, I am interested in refreshing an alv created WITHOUT ABAP OBJECTS; I use functions like REUSE_ALV_GRID_DISPLAY and I was wondering if is there any function like this to refresh an ALV when I make changes in the data inside of it. Thanx!