How to return serch results in document library displayed on a webpart on sharepoint 2010
Hi all,
I want to do an search request on a document library displayed in a web part, but i want to return the results on the page where the document library is displayed not in the original location of the document library
Thanks in Advance
Hi,
Yes you can do this by adding search box and search result webpart on Document library Allitems.aspx.You can set scope of search result as document library only.
Hope this helps you.
Regards
Soni K
Similar Messages
-
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 to return query result in procedure
Hi all,
Can anyone tell me how to return query result in pl/slq procedure using out .
thank you
regards
P PrakashProcedure for sys_refcursor:
create or replace procedure ptest(c out sys_refcursor) is
begin
open c for select * from dual;
end;Procedure for collections(although sys.ODCIVarchar2List is varray, same example you can use with "table of")
create or replace procedure ptest2(c out sys.odcivarchar2list) is
begin
select dummy
bulk collect into c
from dual;
end;Example:
declare
c sys_refcursor;
v varchar2(100);
vt sys.odcivarchar2list;
begin
ptest(c);
fetch c into v;
dbms_output.put_line('1.Cursor data: '||v);
ptest2(vt);
dbms_output.put_line('2.Collection data: '||vt(1));
end;Regards,
Sayan M. -
Creating a Folder Within Form or Document Library & Display the name not in the name column.
I have created a form library that will used to create folders within that. The folder creation is done using an InfoPath Form that has been uploaded to the Form Library. When the new folder was created the name will be displayed at the Name column within
the Form Library. I want to change that to another column like documents or suchlike.
Can it be done using InfoPath 2010 VSTA C# or not? If their are other options available please could you try to inform me!
Thank You,
ChiranthakaHi,
If you want to show the name of folder in another column, a workaround is that you can create an extra column, then create a SharePoint Designer workflow to set the value of
this column with the name of folder.
Here is a link about Create Workflow using SharePoint Designer and set field value for your reference:
http://www.codeproject.com/Tips/419037/Create-Workflow-using-SharePoint-Designer
I have seen a similar post from you in the link below:
http://social.technet.microsoft.com/Forums/en-US/c3ff3f17-dbe2-40f9-86c5-ff7d4b663f09/creating-a-folder-within-form-or-document-library-display-the-name-not-in-the-name-column?forum=sharepointcustomizationprevious
It's recommended that you post a single question in a single thread which will make it easier to be discussed by others.
Best regards
Patrick Liang
TechNet Community Support -
How do I get my new 27" Thunderbolt Display to work with my mid-2010 Macbook Pro?
How do I get my new 27" Thunderbolt Display to work with my mid-2010 Macbook Pro? Or am I SOL?
Hardware Overview:
Model Name: MacBook Pro
Model Identifier: MacBookPro6,1
Processor Name: Intel Core i7
Processor Speed: 2.8 GHz
Number of Processors: 1
Total Number of Cores: 2
L2 Cache (per Core): 256 KB
L3 Cache: 4 MB
Memory: 8 GB
Processor Interconnect Speed: 4.8 GT/s
Boot ROM Version: MBP61.0057.B0F
SMC Version (system): 1.57f18You can't. Theoretically, Thunderbolt devices that only transfer video and audio should work with Mini DisplayPort MacBooks like yours, but it's not the case of the Thunderbolt Display. Its firmware doesn't allow it to be used with non-Thunderbolt Macs, so you can't use the Thunderbolt Display with the Mid 2010 MacBook Pro.
Instead, you have to look for another screen, or you can get an adapter and connect the MacBook Pro to a TV -
How to read excel file in document library and store excel content in sql table
Hello,
Can anyone help me how to read the excel file present in document library and store the content inside excel into sql table?
Please let me know the ways to acheive this. Feel free to give your suggestions.
Thanks,
Cool DeveloperHi!
this code i have written becuase i donot find any soltions on net for this , u can try with this . :)
System.Data.OleDb.
OleDbConnection ExcelConnection = null;
FileMode fileMode;
string filePath = ConfigurationManager.AppSettings["TempLoaction"] + "\\" + fileName;
using (SPSite _site = new SPSite(SPContext.Current.Web.Url))
using (SPWeb _web = _site.OpenWeb())
string docLibrary = ConfigurationManager.AppSettings["DocumentLibrary"];
SPFile _file = _web.GetFile("/" + docLibrary + "/" + fileName);
fileMode =
FileMode.Create;
byte[] byteArray = _file.OpenBinary();
MemoryStream dataStream = new MemoryStream(byteArray);
Stream stream = dataStream;
using (FileStream fs = File.Open(filePath, fileMode))
byte[] buffer = new byte[4096];
int bytesRead;
while ((bytesRead = stream.Read(buffer, 0, buffer.Length)) != 0)
fs.Write(buffer, 0, bytesRead);
fs.Close();
//Create the Connection String
try
string ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;
Data Source ='"
+ filePath + "'; Extended Properties=Excel 5.0";
//Create the connection
ExcelConnection =
new System.Data.OleDb.OleDbConnection(ConnectionString);
//create a string for the query
string ExcelQuery;
//Sheet1 is the sheet name
//create the query:
//read columns from the Excel file
ExcelQuery =
"Select * from [Sheet1$]"; // from Sheet1";
//use "Select * ... " to select the entire sheet
//create the command
System.Data.OleDb.
OleDbCommand ExcelCommand = new System.Data.OleDb.OleDbCommand(ExcelQuery, ExcelConnection);
//Open the connection
ExcelConnection.Open();
//Create a reader
System.Data.OleDb.
OleDbDataReader ExcelReader;
ExcelReader = ExcelCommand.ExecuteReader();
//For each row after the first
while (ExcelReader.Read())
thanks,
kshitij -
How to control access to a document library based on fields of the list?
Hi,
I need to give access to a document library but the users who need permission are unknown until the form
is submitted to the document library. The 2 users information are in 2 fields of the form. I created a infopath form and a workflow with it.
I need to give the "CreatedBy" user, the person who completed and submitted the form, and the
Requester (a data field on the form), both need access to the new document library or just to the forms they submitted. How do I setup access for the createor and requester of the form? These are unknown until the time of the form submission and
it's dynamic.
Anyway to implement this in SP? If not what about coding for when the form is loaded. Can
someone point me to a sample coding for ref fields in the form when form is first loaded up? Also, how to redirect to a access denied view in the code.
Thank you.It's not easy OOTB but it can be done if you either use code or use some code someone else created.
Have a look at this on codeplex
https://spdactivities.codeplex.com/wikipage?title=Grant%20Permission%20on%20Item -
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 export and import a document library data to a new sharepoint farm
Hi
i have a sharepoint 2010 farm and has one sharepoint web application
in this application it has a document library and this doc library has a 2000 folders and each folder has 2500 documents
, here i how i export upto 500 folders from this doc library to a new sharepoint farm
adilif your both farm are on same version level then you can use export & import funcation if only Document library required.
Perform export on source farm
Export a site, list, or document library in SharePoint Server 2010
copy the files to target farm and run the import.
Import a list or document library in SharePoint Server 2010
another way is backup the site collection from source and restore it to destination.
for backup: http://technet.microsoft.com/en-us/library/ee748617(v=office.14).aspxFor
restore: http://technet.microsoft.com/en-us/library/ee748655(v=office.14).aspx
there is always 3rd party tool options.
Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog -
How to create custom workflow for document library?
Hi All,
I have a document library with a custom people picker column "assign to". Need to create approval workflow using designer, approval must send to person who is selected in "assign to" column. I tried with designer workflow,But finally
facing "The e-mail message cannot be sent. Make sure the e-mail has a valid recipient". How to fix and achieve my scenario? Thanks in advance!I would suggest you to firstly print the assign to value using "Log to history" action. Moslty it could be of three reasons,
1. Assign to value is not getting populated correctly in your SPD workflow
2. Email server is not configured properly, If alerts and other emails are workfing in your server then this would not be a reason for issue
3. The user your trying to send an email does not have valid email
do let us know if can get the user email in your workflow.
Hope this helps!
Ram - SharePoint Architect
Blog - SharePointDeveloper.in
Please vote or mark your question answered, if the reply helps you -
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.
-
How to fast attach files from document library to e-mail?
Hi
I have SP2013 , and i love it to drag and drop the documents into Document library,
it is posible that i can drag and drop the files from SharePoint document library to new E-Mail or Internet Explorer?
tanxs for answer.Harmon.IE provide an outlook plug-in that provides drag-drop functionality for SharePoint within outlook and could be worth taking a look at.
I believe it's license free up to 100 seats, but you'll need to verify that.
Paul.
Please ensure that you mark a question as Answered once you receive a satisfactory response. This helps people in future when searching and helps prevent the same questions being asked multiple times. -
Hi All,
I am crawling documents from a file server. I created a new content source and crawled the documents. All documents are crawled successfully.
Then I went to my enterprise search center site collection and created a new result source. I have added the query to use above content source.
After that, on a page I am trying to configure the search results web part to display documents using this result source. Now the problem is:
It displays all the documents that are crawled without searching for anything. I mean first it should not display any results. If a user searches for something , then according to that search it should display results.
Any idea how to do this in the web part? I am using SharePoint 2013 on premise enterprise edition. No code. Totally OOTB.Hi Mohan,
What did you use for the Query text in the result source?
I could reproduce this issue when I used Query text like: {searchTerms} Path:”http://sps2k13sp/sites/First/Shared%20Documents”
Then I changed the Query to
{?{searchTerms}
Path:"http://sps2k13sp/sites/First/Shared%20Documents"}
, then Search result web part didn’t return results without searching.
So , check your result source, and use the Query like the above(adding "{?...}").
I hope this helps.
Thanks,
Wendy
Wendy Li
TechNet Community Support -
Opening Document Library PDF in a New Window (Sharepoint 2013)
Hello,
I have numerous PDF's in a document library. When the PDF opens in the browser, the PDF's contain links to various other sites; however, when the user clicks the link on the PDF from the document library, the link opens in the same window as the PDF. I would
like the link to open the PDF in a new browser window.
I have searched Google but cannot find anything for SharePoint 2013. We are hosting our SharePoint on the Office 365 package. I found one solution that is repeated on many forums, but I do not see the "Convert to XSLT data view" anywhere
in SharePoint designer 2013. The solution states:
"Edit the document library in SharePoint Designer.
1. Open the site in SharePoint Designer and then open the document library allitems.aspx.
2. Right-click the document library web part and select “Convert to XSLT data view”.
3. Locate the name column, you will see this tag “<A onfocus="OnLink(this)" HREF="{@FileRef}"….. ”, add “target=”_blank”” in tag.
4. After this, the documents will be opened in a new window."
I do see my allitems.aspx and can open that with a text editor. The contents of that file are:
<%@ Page language="C#" MasterPageFile="~masterurl/default.master" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=16.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="ApplicationPages" Namespace="Microsoft.SharePoint.ApplicationPages.WebControls" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<asp:Content ContentPlaceHolderId="PlaceHolderPageTitle" runat="server"><SharePoint:ListProperty Property="TitleOrFolder" runat="server"/> - <SharePoint:ListProperty Property="CurrentViewTitle" runat="server"/></asp:Content>
<asp:content contentplaceholderid="PlaceHolderAdditionalPageHead" runat="server">
<SharePoint:RssLink runat="server" />
</asp:content>
<asp:Content ContentPlaceHolderId="PlaceHolderPageImage" runat="server"><SharePoint:ViewIcon Width="145" Height="54" runat="server" /></asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderLeftActions" runat="server">
<SharePoint:RecentChangesMenu runat="server" id="RecentChanges"/>
<SharePoint:ModifySettingsLink runat="server" />
</asp:Content>
<asp:Content ContentPlaceHolderId ="PlaceHolderBodyLeftBorder" runat="server">
<div height="100%" class="ms-pagemargin"><img src="/_layouts/15/images/blank.gif?rev=32" width='6' height='1' alt="" data-accessibility-nocheck="true"/></div>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
<WebPartPages:WebPartZone runat="server" FrameType="None" ID="Main" Title="loc:Main" />
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderPageDescription" runat="server">
<SharePoint:ListProperty CssClass="ms-listdescription" Property="Description" runat="server"/>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderCalendarNavigator" runat="server">
<SharePoint:SPCalendarNavigator id="CalendarNavigatorId" runat="server"/>
<ApplicationPages:CalendarAggregationPanel id="AggregationPanel" runat="server"/>
</asp:Content>did you try this one?
http://social.technet.microsoft.com/Forums/sharepoint/en-US/71b24f4b-570a-48fa-9ec3-91073eafaebd/open-pdfs-in-new-window?forum=sharepointadminprevious
or trying to use the content editor web part...
http://social.technet.microsoft.com/Forums/sharepoint/en-US/9db08c4a-b53c-419a-84f8-001c194d1311/how-to-open-sharepoint-document-library-pdf-file-in-new-window?forum=sharepointadminlegacy
try this solution...check the column which having the clickable link.
http://social.technet.microsoft.com/Forums/sharepoint/en-US/99e9559a-da76-4722-982c-882b3e4181c7/hyperlink-column-type-open-in-new-window
Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog -
Unable to add aspx file to document library using REST and JSOM in SharePoint Hosted App
Hi,
I am unable to add an aspx file to document library. I was actually trying to create a WIKI page and upload to Pages library but that wasn't working so I tried simple document library. It keeps failing with Access Denied error. I have checked
the blocked types and aspx is not included. I can upload it directly from the browser so that shouldn't be the case. I have read that it can be achieved with CSOM but I need this to work with a SharePoint Hosted App. Here is my JSOM:
factory = new SP.ProxyWebRequestExecutorFactory(appweburl);
context.set_webRequestExecutorFactory(factory);
appContextSite = new SP.AppContextSite(context, hostweburl);
oWeb = appContextSite.get_web();
oList = oWeb.get_lists().getByTitle('Documents');
fileCreateInfo = new SP.FileCreationInformation();
fileCreateInfo.set_url("mywiki.aspx");
fileCreateInfo.set_content(new SP.Base64EncodedByteArray());
fileContent = "<%@ Page Inherits=\"Microsoft.SharePoint.Publishing.TemplateRedirectionPage,Microsoft.SharePoint.Publishing,Version=15.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c\" %> <%@ Reference VirtualPath=\"~TemplatePageUrl\"
%> <%@ Reference VirtualPath=\"~masterurl/custom.master\" %>";
for (var i = 0; i < fileContent.length; i++) {
fileCreateInfo.get_content().append(fileContent.charCodeAt(i));
newFile = oList.get_rootFolder().get_files().add(fileCreateInfo);
context.load(newFile);
context.executeQueryAsync(function () {
alert('yo');
}, function (sender, args) {
alert(args.get_message() + '\n' + args.get_stackTrace());
If I change the file extension to "txt", it works. Same with REST implementation, it works with "txt" but fails with "aspx". Maybe what I am trying to do will not work using JSOM or REST. Any suggestions? Your
help is always appreciated.
Regards,
kashifYour code works fine in both my on-premises and SharePoint Online. I have given the app full control, so I suspect this is a permissions issue. I would check your permissions on your appmanifest. Must be something to do with publishing permissions. Try
giving full control and work the permissions down.
Blog | SharePoint Field Notes Dev Tools |
SPFastDeploy | SPRemoteAPIExplorer
Maybe you are looking for
-
MS Access Date problem (from Java program)
I have written an app. in Java that reads & writes data from a MS Access database. I am trying to write an insert class which will add a row of data to one of my database tables - which contains Date fields. My problem is that I can update the text f
-
How to delete iPhone camera roll's photos in new version Photos for Mac
Hi, Before upgrade to new version Photos for Mac. I was using iPhoto + Photo Stream to manage all the photos took from my iPhone. Photo Stream will upload all new photos to iPhoto; when I connect iPhone to my mac, I can use iPhoto to delete my iPhone
-
I have 7.4.1.2 and when i try and update itunes i get the error The url could not be opened Anyone have any ideas
-
How to open Designer in Linux environment.
I have installed Business Objects XI 3.1 on Linux 5. Now I want to create Universe and Desktop Intelligence Reports. 1. How do I open Designer. In windows we can open it from Program file. How to do it in Linux environment. 2. Do we need to i
-
We are using PTO/ATO Models and want to ensure we only issue a credit note if the complete model was returned. Somehow Oracle interfaces each component/option directly to receivables interface. Do you know a way to ensure complete credit notes ? (oth