How to avoid postback while filter document library using metadata navigation filters?
Hi All,
Please help me with this scenario. I have a document library with metadata columns and normal columns and have enabled metadata navigation settings and key filters.
It filters fine. But only problem every time i click the whole page will refresh. is there any way we can avoid page refresh while filtering.
Or
Any alternative solutions also much appreciated.
Thanks for your help in advance.
You're not going to be able to avoid that post back. The pages haven't been designed to allow AJAX behaviour and trying to re-build them would be a monster for MS let alone for you.
Similar Messages
-
How to play latest video in document library using Media webpart?
Hi,
We are trying to play latest video file which is in SharePoint library by using Media webpart. We are adding video files in document library. The top most item or latest item should be played in our page using media webpart. Please let me know if any
OOB features available for implementing this.
Your help would be appreciated.
Thanks., PrakashHi,
We can get the latest video file URL dynamically and create Media player using ECMAScript Client Object Model.
The following articles for your reference:
How to: Configure the MediaWebPart Object Using JavaScript (ECM)
http://msdn.microsoft.com/en-us/library/ee558890.aspx
JavaScript to Create Media player
http://psnagarkar.blogspot.com/2013/06/javascript-to-create-media-player-in.html
Working with the ECMAScript Client Object Model (JSOM)
http://msdn.microsoft.com/en-us/library/office/hh372944(v=office.14).aspx
Best Regards
Dennis Guo
TechNet Community Support -
How to update managed metadata column for all file in document library using powershell
Hi,
How to update managed metadata column for all file in document library using powershell?
Any help on it.
Thanks & REgards
Poomani SankaranHi TanPart,
I have changed the code which you have give in order to get the files from SharePoint 2010 Foundation Document Library.But i am getting below error in powershell.
Property 'ListItemCollectionPosition' cannot be found on this object; make sure it exists and is settable.
Could you tell me which is the issues in it?
See the code below.
$web = Get-SPWeb http://ntmoss2010:9090/Site
$list = $web.Lists["DocLib"]
$query = New-Object Microsoft.SharePoint.SPQuery
$query.ViewAttributes = "Scope='Recursive'";
$query.RowLimit = 2000
$caml = '<Where><Contains><FieldRef Name="Title" /><Value Type="Text">Process Documents/Delivery</Value></Contains></Where>' +
'<OrderBy Override="TRUE"><FieldRef Name="ID"/></OrderBy>'
$query.Query = $caml
do
$listItems = $list.GetItems($query)
$spQuery.ListItemCollectionPosition = $listItems.ListItemCollectionPosition
foreach($item in $listItems)
#Cast to SPListItem to avoid ambiguous overload error
$spItem = [Microsoft.SharePoint.SPListItem]$item;
Write-Host $spItem.Title
while ($spQuery.ListItemCollectionPosition -ne $null)
Thanks & Regards
Poomani Sankaran -
How to add a record in document library without upload file.
Hi,
how to add a record in document library without upload file?
Is it possible? I want to create a folders in Document Library but inside folders i do not want to upload a file instead of just i want to create a record. I will map my local file path to the records.
Can anyone help me on it?
Thanks & Regards
Poomani SankaranHello Sankaran,
document library is to upload documents, without document you will not be able to add a record or Item to it.
for your requirement you can use a list and enable folders within the list and maintain the local path of the file as an item in list.
http://www.sharepointbriefing.com/spconfig/article.php/3834951/Enable-the-New-Folder-Creation-Option-in-SharePoint-Custom-Lists.htm
My Blog- http://www.sharepoint-journey.com|
If a post answers your question, please click Mark As Answer on that post and Vote as Helpful -
How top Open a Excel Document from share point document library using jquery
How top Open a Excel Document from share point document library using jquery
Hi,
According to your post, my understanding is that you want to open excel file via JQuery.
To open excel file, we can use the following code.
<script type="text/javascript">
function openExcel(strFilePath) {
var yourSite = "http://www.yoursite.com";
openExcelDocPath(yourSite + strFilePath, false);
function openExcelDocPath(strLocation, boolReadOnly) {
var objExcel;
objExcel = new ActiveXObject("Excel.Application");
objExcel.Visible = true;
objExcel.Workbooks.Open(strLocation, false, boolReadOnly);
</script>
For more reference:
http://www.kavoir.com/2009/01/using-javascript-to-open-excel-and-word-files-in-html.html
http://www.dotnetspider.com/resources/43453-Open-Word-Excel-files-using-Javascript.aspx
Thanks & Regards,
Jason
Jason Guo
TechNet Community Support -
Get/retreive managed metadata column value from Document Library using SharePoint 2013 JSOM
Hi,
I am trying to retrieve managed metadata column (NewsCategory) value in SharePoint 2013 Document library using JSOM.
I get "Object Object" rather than actual value.
I tried:-
var newsCat = item.get_item('NewsCategory');
alert(newsCat) //Displays [Object Object]
var newsCatLabel = newsCat.get_label();
var newsCatId = newsCat.get_termGuid();
But, I get the error "Object doesn't support property or method get_label()"
I also tried :-
var newsTags = item.get_item(' NewsCategory ');
for (var i = 0; i < newsTags.get_count() ; i++) {
var newsTag = newsTags.getItemAtIndex(i);
var newsTagLabel = newsTag.get_label();
var newsTagId = newsTag.get_termGuid();
Even now I get the error "Object doesn't support property or method get_count()"
I have included " NewsCategory " in the load request:- context.load(items, 'Include(File, NewsCategory)');
Any idea what the issue is? Do I have to add any *.js file using $.getScript?
I added following .js files
var scriptbase = _spPageContextInfo.webServerRelativeUrl + "/_layouts/15/";
$.getScript(scriptbase + "SP.Runtime.js", function () {
$.getScript(scriptbase + "SP.js", function () {
$.getScript(scriptbase + "SP.Core.js", function () {
Thanks in Advance,Hi Patrick,
I already added those references. I just pasted the parts of script snippet in my initial post. To avoid confusion I am pasting here complete script.
2.1.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var scriptbase = _spPageContextInfo.webServerRelativeUrl + "/_layouts/15/";
$.getScript(scriptbase + "SP.Runtime.js", function () {
$.getScript(scriptbase + "SP.js", function () {
$.getScript(scriptbase + "SP.Core.js", function () {
function getdata() {
var context = new SP.ClientContext.get_current();
var web = context.get_web();
var list = web.get_lists().getByTitle('Documents');
var camlQuery = new SP.CamlQuery();
var filterCategory = 'Solutions';
var IDfromTaxonomyHiddenList = 15;
camlQuery.set_viewXml('<View><Query><Where><Eq><FieldRef LookupId="TRUE" Name="'+filterCategory+'" /><Value Type="ID">' + IDfromTaxonomyHiddenList +'</Value></Eq></Where></Query></View>');
/*the above CAML query successfully gets all the list items matching the criteria including "NewsCategory" managed metadata column values
But when I try to display the value it retrieved it ouputs/emits Object Object rather than actual values */
var items = list.getItems(camlQuery);
context.load(items, 'Include(File,NewsCategory)');
context.executeQueryAsync(
Function.createDelegate(this, function (sender, args) {
if (items.get_count() > 0) {
var listItemEnumerator = items.getEnumerator();
while (listItemEnumerator.moveNext()) {
var oListItem = listItemEnumerator.get_current();
var file = oListItem.get_file();
var name = file.get_name();
var newsCat = oListItem.get_item('NewsCategory'); alert(newsTags.constructor.getName());
alert(newsCat) //Displays [Object Object]
var newsCatLabel = newsCat.get_label(); // Here it errors out with message "Object doesn't support property or method get_label()"
var newsCatId = newsCat.get_termGuid();
} //end while
}//end if
Function.createDelegate(this, function (sender, args) {
alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
ExecuteOrDelayUntilScriptLoaded(getdata, "SP.Core.js");
</script>
In the above script "var name = file.get_name(); " gets the exact file name.
But the line "var newsCat = item.get_item('NewsCategory');
alert(newsCat) //Displays [Object Object] rather than actual value.
Issue resolved replace "oListItem.get_item('NewsCategory');" with oListItem.get_item('NewsCategory').get_label();"
Thanks -
Unable to edit .vsdx visio file that is inside a document library using visio 2010 sp2
I have Visio 2010 SP2 installed locally inside my machine. The current version can open vsdx files by doing some conversions. I got the following scenario inside my SharePoint server 2013:-
Currently I have Visio file (with .vsdx extension) uploaded to my SharePoint 2013 document library.
If I click on the Visio file I got the following dialog.
I select “Edit”, click on ok.
Then the visio 2010 application will convert the current file and open it locally inside my machine.
But the opened file will have it name as “Copy (1) of ….”, as follow:-
So if I do some changes to the Visio file and I click on save I will not be able to save my changes back to the SharePoint server’s document library. Now if I do the same steps for a .vsd file not .vsdx then I can directly open the Visio file (without any
conversion process) and I will be able to save my changes back to SharePoint server.
So can anyone advice how to be able to edit .vsdx files which are uploaded to SharePoint document library using visio 2010 SP2 ?
ThanksThank you for your ideas.
After that last posting, but before your response, I asked them to add the local farm to their trusted sites zone. Several blogs I had encountered while searching had listed that as something they had tried.
As soon as they added the site to their trusted site zone, the problems went away.
It was definitely not all users - I only had 2 people directly contact me about the issue.
I never got a chance to ask them about other SharePoint sites - they were working on the sites where they spent most of their time - I don't know if they had other sites.
The old location and the new location of these 2 sites are in the same site collection - it was moving them from
http://myfarm/sites/div/dept67/site1
to
http://myfarm/sites/div/dept64/site1
basically (with the actual names changed to protect my job).
The site collection is /sites/div . So the site collection features are the same.
I suppose that the site features could have changed between the export and the import - but since things are working now and I didn't change any features, I don't think that it is.
At this point, things appear to be working. However strange that seems to me. -
Download older version of a file from SharePoint Document Library using CSOM and 404 error
Hi,
I am trying to download previous versions including Major and Minor versions of documents from SharePoint Online using CSOM. I get 404 error when I try to download the file. I found several posts on various discussion forums where people are getting same
error but none of those have any solution/answer. Below is one of the threads and sample code I have tried that results in 404 error. If I use the link in browser directly, I am able to download the file. Also I am able to download the current version of file
using CSOM without any problem, it is only the older versions that give me 404 in CSOM.
http://qandasys.info/how-to-download-the-historical-file-version-content-using-csom/
public int GetStreamFromFile(string docid, string lib, string fileurl, ClientContext clientContext, int iuserid, string Version, bool isCurrrent)
if(!isCurrent)
List LibraryName = clientContext.Web.Lists.GetByTitle(lib);
clientContext.Load(LibraryName);
clientContext.ExecuteQuery();
CamlQuery camlQuery = new CamlQuery();
camlQuery.ViewXml = "" + fileurl +
Microsoft.SharePoint.Client.ListItemCollection collListItem = LibraryName.GetItems(camlQuery);
clientContext.Load(collListItem, items => items.Include(item => item.Id, item => item["FileLeafRef"], item => item["LinkFilename"],
item => item["FileRef"], item => item["File_x0020_Size"], item => item["DocIcon"], item => item.File.Versions));
//clientContext.Load(collListItem);
clientContext.ExecuteQuery();
foreach (Microsoft.SharePoint.Client.ListItem oListItem in collListItem)
//string fileurl1 = (string)oListItem["FileRef"];
//string filename = (string)oListItem["LinkFilename"];
foreach (FileVersion version in oListItem.File.Versions)
if (Version == version.VersionLabel)
//Added excutequery to get object one more time as per blog
//http://social.technet.microsoft.com/Forums/de-DE/sharepointdevelopmentprevious/thread/88a05256-8694-4e40-863d-6c77512e079b
clientContext.ExecuteQuery();
FileInformation fileInformation = ClientOM.File.OpenBinaryDirect(clientContext,version.Url);
bytesarr = ReadFully(fileInformation.Stream);
DarwaishHi,
According to your description,
I know you want to get older version of a file from SharePoint Document Library using Client Object Model.
The following code snippet for your reference:
public void GetVersions()
ClientContext clientContext = new ClientContext(“http://SPSite”);
Web site = clientContext.Web;
clientContext.Load(site);
clientContext.ExecuteQuery();
File file = site.GetFileByServerRelativeUrl(“/Shared Documents/mydocument.doc”);
clientContext.Load(file);
clientContext.ExecuteQuery();
ListItem currentItem = file.ListItemAllFields;
clientContext.Load(currentItem);
clientContext.ExecuteQuery();
FileVersionCollection versions = file.Versions;
clientContext.Load(versions);
clientContext.ExecuteQuery();
if (versions != null)
foreach(FileVersion _version in versions)
Console.WriteLine(“Version : {0}”,_version.VersionLabel);
More information:
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.file.versions.aspx
Best Regards,
Dennis Guo -
C#/REST Getting files in a document library using Internal Name
Hi Folks,
I need to get a list of files in a SP2010 and SP2013 document library using the REST API - this is occurring inside a timer service application so am using C#. As a constraint I need to use the internal names for the document libraries - primarily
because users tend to change the display name and this is an automated service.
When I make a call to _api/web/GetFolderByServerRealitveUrl('/Shared Documents')/Files I get a bunch of XML but how do I get just a list of filename+ext. I am using Xdocument (LINQ to XML). I need to retrieve the name property in the
contents sub element for all files returned.
Second question, how to I change this to use the internal name '/Document' instead of '/Shared Document', so that it copes with users changing the display name of document libraries.
Regards
AndyHi Andy,
1.For your issue, you can refer to the code as below:
using System.Xml;
namespace REST_XML_LIST_GET
class Program
static XmlNamespaceManager xmlnspm = new XmlNamespaceManager(new NameTable());
static Uri sharepointUrl = new Uri("Site URL/");
static void Main(string[] args)
xmlnspm.AddNamespace("atom", "http://www.w3.org/2005/Atom");
xmlnspm.AddNamespace("d", "http://schemas.microsoft.com/ado/2007/08/dataservices");
xmlnspm.AddNamespace("m", "http://schemas.microsoft.com/ado/2007/08/dataservices/metadata");
NetworkCredential cred = new System.Net.NetworkCredential("username", password", "domain");
HttpWebRequest listRequest = (HttpWebRequest)HttpWebRequest.Create(sharepointUrl.ToString() + "_api/Web/lists/getByTitle('List Name')/items");
listRequest.Method = "GET";
listRequest.Accept = "application/atom+xml";
listRequest.ContentType = "application/atom+xml;type=entry";
listRequest.Credentials = cred;
HttpWebResponse listResponse = (HttpWebResponse)listRequest.GetResponse();
StreamReader listReader = new StreamReader(listResponse.GetResponseStream());
var listXml = new XmlDocument();
listXml.LoadXml(listReader.ReadToEnd());
//Method 1 Seperate node list
var titleList = listXml.SelectNodes("//atom:entry/atom:content/m:properties/d:Title", xmlnspm);
var idList = listXml.SelectNodes("//atom:entry/atom:content/m:properties/d:ID", xmlnspm);
int i = 0;
foreach (XmlNode title in titleList)
Console.WriteLine(title.InnerXml+" "+idList[i++].InnerXml);
//Method 2 single node list
var prop = listXml.SelectNodes("//atom:entry/atom:content/m:properties", xmlnspm);
foreach (XmlNode ndlist in prop)
Console.WriteLine(ndlist.SelectSingleNode("d:Title", xmlnspm).InnerXml + " " + ndlist.SelectSingleNode("d:ID", xmlnspm).InnerXml);
Console.ReadLine();
2. For a workaround, you can get the display name based on the internal name and use the display name in the Rest API.
Reference:
http://www.c-sharpcorner.com/UploadFile/Roji.Joy/working-with-sharepoint-2013-rest-api-in-a-C-Sharp-managed-code/
https://dlr2008.wordpress.com/2013/11/14/sharepoint-2013-rest-api-the-c-connection-part-4-document-libraries-folders-and-files/
Thanks,
Eric
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected].
Eric Tao
TechNet Community Support -
Query a document library using Search Rest API
How can we search for a specific document library using SharePoint Search through Rest API? We have a couple of document libraries which have thousands of documents with its relevant metadata information stored. We need to create an app to search through
these document libraries and display the document and its metadata. Can someone point me in the right direction?
VTaking what Shakir said you would substitute queryText with a managed property query (KQL) to query against metadata from the Document library. So if your document library has a Owner column then you would either create or use an existing managed property
defined in the Search Schema. So your query may look like this:
https://<site URL>/_api/search/query?querytext='(owner:smith)+AND+(path:<library url>)'
Link:
https://msdn.microsoft.com/en-us/library/office/ee558911.aspx?f=255&MSPPError=-2147217396
Blog | SharePoint Field Notes Dev Tools |
SPFastDeploy | SPRemoteAPIExplorer -
Hi All,
We have SharePoint Production server 2013 where users are complaining that they are not able to copy or move files from one document library to another document library using “Open with Explorer” functionality.
We tried to activate publishing features on production server but it did not work. We users reported following errors:
Copying files from one document library to another document library:
Tried to map the document libraries and still not get the error to copy files:
In our UAT environment we are able to copy and move folders from using “Open with Explorer” though.
We have tried to simulate in the UAT environment but could not reproduce the production environment.
Any pointers about this issue would be highly appertained.
Thanks in advance
Regards,
Aroh
Aroh ShuklaHi John and all,
One the newly created web applications that we created few days back and navigated to document library, clicked on “Open with Explorer”, we get this error.
We're having a problem opening this location in file explorer. Add this website to your trusted and try again.
We added to the trusted site in Internet Explorer for this web application, cleared the cache and open the site with same document library but still get the same above error.
However, another existing web application (In same the Farm) that we are troubleshooting at the moment, we are able click on “Open with Explorer”, login in credentials opens and we entered the details we are able to open the document
library and tried to follow these steps:
From Windows Explorer (using with Open with Explorer), tried to copy or move a files to
source document library.
From Windows Explorer moved this file to another destination document library and we got this error.
What we have to achieve is users should be able to copy files and folders using
Open with Explorer functionality. We don’t know why Open with Explorer
functionality not work working for our environment.
Are we doing something wrong?
We have referred to following websites.
we hope concepts of copying / Moving files are similar as SharePoint 2010. Our production environment is SharePoint 2013.
http://www.mcstech.net/blog/index.cfm/2012/1/4/SharePoint-2010-Moving-Documents-Between-Libraries https://andreakalli.wordpress.com/2014/01/28/moving-or-copying-files-and-folders-in-sharepoint/
Please advise us. Thank you.
Regards,
Aroh
Aroh Shukla -
Hi i am trying to add a new item and update existing field value in a document library with powershell
but i receive below error message.
PS C:\Users\spfarm> C:\Scripts\add.ps1
Exception calling "Update" with "0" argument(s): "To add an item to a document
library, use SPFileCollection.Add()"
At C:\Scripts\add.ps1:24 char:16
+ $newItem.Update <<<< ()
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException
#Add SharePoint PowerShell Snapin which adds SharePoint specific cmdlets
Add-PSSnapin Microsoft.SharePoint.PowerShell -EA SilentlyContinue
#Variables that we are going to use for list editing
$webURL = "http://tspmcwfe:89"
$listName = "test"
#Get the SPWeb object and save it to a variable
$web = Get-SPWeb $webURL
#Get the SPList object to retrieve the "Demo List"
$list = $web.Lists[$listName]
#Create a new item
$newItem = $list.Items.Add()
#Add properties to this list item
$newItem["Title"] = "My second item!"
$newItem["Info"] = "s15"
#Update the object so it gets saved to the list
$newItem.Update()
$web.Dispose()
adilHi Adil,
Document Library is different from a normal list. The document library contains files inside it. You need to update the code to add a document to the library. Then you can get hold of the List Item represented by that file and update its properties. Here
is an example:
$WebURL = "http://aissp2013/sites/TestSite"
$DocLibName = "Docs"
$FilePath = "c:\blogs.txt"
# Get a variable that points to the folder
$Web = Get-SPWeb $WebURL
$List = $Web.GetFolder($DocLibName)
$Files = $List.Files
# Get just the name of the file from the whole path
$FileName = $FilePath.Substring($FilePath.LastIndexOf("\")+1)
# Load the file into a variable
$File= Get-ChildItem $FilePath
# Upload it to SharePoint
$spFile = $Files.Add($DocLibName +"/" + $FileName,$File.OpenRead(),$false)
$item = $spFile.Item
$item["Title"] = "New Title"
$item.Update()
$web.Dispose()
Blog | SharePoint Learnings CodePlex Tools |
Export Version History To Excel |
Autocomplete Lookup Field -
How to avoid Java Studio Creator 2 to use the regional settings?
How to avoid Java Studio Creator 2 to use the regional settings to select the language that will be used to display the IDE in a certain language?
My country settings are set to Belgium (French) but I want to have my IDE running in English.
What should I change in the defautl properties of JSC2 to avoid this behaviour?
Please, don't tell me to change my regional settings, it is not a valid answer :-)
Best regards,
Abdelkrim BOUJRAFjust modify creator.conf in directory etc/
add: -J-Duser.language=en
in the netbeans_default_options line:
like this:
netbeans_default_options="-J-Duser.language=en -J-Xms96m -J-Xmx384m -J-XX:PermSize=32m -J-XX:MaxPermSize=128m -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled -J-Xverify:none -J-Dnetbeans.javacore.background_scanning=true -J-Dsunappsrvint.home=\"C:\Program Files\Sun\Creator2\SunAppServer8\"" -
I have been asked to see if it would be possible to get exchange emails downloaded and or sent to a document library .
I know of the sitemail box app. but we are not running Exchange 2013.
and setting up the lists and or document library to receive emails using the built in doesn't seem to be working...( maybe not configured correctly, i would need to see what the prior admin/developer did)
But is there a way to get the emails downloaded to a document library using a workflow and or a powershell script that is triggered via workflow?Hi,
Since workflow can only work on items in SharePoint sites, they cannot get Exchange emails, let alone download emails to SharePoint library. However, you could manually save email to local and upload it to SharePoint list/library.
I'd suggest you toubleshooting the incoming email settings in SharePoint. Please refer to the article below and check your configuration:
https://technet.microsoft.com/en-us/library/cc262947.aspx
http://blogs.technet.com/b/harmeetw/archive/2012/12/29/sharepoint-2013-configure-incoming-emails-with-exchange-server-2013.aspx
Regards,
Rebecca Tu
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] -
Avoid login while opening document from Document library
Even though I loginned into Share point 2013 site, when i click on any document in the document library to open , it is asking again for Login. How can i avoid this.
Rajesh,
Please add the site in Intranet Zone and Trusted Zone under IE and also check the box automatically login using current user name and password.
Thank You, Pallav S. Srivastav ----- If this helped you resolve your issue, please mark it Answered.
Maybe you are looking for
-
I updated two add-ons this morning, Forecastfox Weather and I think Fastest Fox, since then, when I click on my home page button next to the browser, it doesn't do anything. It lights up and appears as if I've pressed it, but it won't take me to my h
-
Please help me..... There has to be a way to recover song files
I imagine what I did is fairly common so I hope there is an easy way to resolve this. Here's what happened. I preformed a full system recovery on my computer, which formatted my hard drive. The result was a faster computer, but I also lost all my son
-
Data fetched from buffer or database
Hi, How to check tin the select query the data is being fetched from buffer or database .Is there any method to trace that or it is just the setting we are doing while creating a table.. Pls suggest
-
How to talk to a real person?
Hello, I've looked on the contact us page a couple times, everything just redirects to more pages that do not seem to help. How do I call to talk to someone regarding billing? I recently merged my wife's plan with my previous family plan and was assu
-
Beats Per Minute (BPM)
My wife likes to work out and she wants to key in on songs with the right BPM. I am assuming this is not included in the song files. How would one find this out? Thanks!