.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Is it possible to dynamically create Name (file name) when item saved to Doc Library?

Posted By:      Posted Date: September 20, 2010    Points: 0   Category :SharePoint
Even though users have been instructed on a naming convention for saving documents to a library after creating a new one  from the library template, they forget or don't understand.  I would like to have the Name column (which is taken from the file name that it is saved as)  in the Document Library be a concatenation of other document meta data elements.  Is this possible?  In other words, is it possible for me to dynamically save the document with the correct file name as a Workflow action (in a Designer created workflow)?  I tried it, but without success.

View Complete Post

More Related Resource Links

Error opening Office Open XML file when using SD workflow to create item in document library.


I have a Sharepoint document library that is using a word template with xml mapping (Word-Sharepoint).

I have a workflow created in Sharepoint designer that Creates an item in this document library with select data from a form library on the same site. 

It appears to create the entry in the document library correctly, it is showing the copied data from the form library and the correct default data in the columns specific to the document library. The explorer view shows the filename.docx files.

I am able to edit the data using the datasheet view, however it will not open the word document.

The error message reads "The Office Open file <filename> cannot be opened because there are problems with the contents." If I click on the details button it states "No error detail available".

Any ideas?

Using Workflow to create an InfoPath item in a Forms Library

Hi Experts: Here is my situation: I have a MOSS 2007 server with list A (regular sharepoint list) and List B (InfoPath form library with a published form) This is what I am trying to accomplish using SharePoint Designer: List A is just a basic list User changes a column in list A to a specific value A new form needs to be added to the forms library B SharePoint designer Workflow will not create a valid xml file in the List B forms library. It just creates an invalid file based on the .xsn file template. Does anyone have any experience creating a valid xml form in a forms library using SharePoint Designer workflow? I can't migrate to 2010 so that is not an option. Thanks for all your advise.

how to create a doc library item using web service

Hi, I think this is a common question, but I coulnd't come up with anything at this point. I'd like to create an item in a document library using SP web service. - no uploading a file. I have created an item using ../copy.asmx web service. Using the WS function(copyWebService.CopyIntoItems function), it seems suitable to create an item AND at the same time to upload a file. I don't think I can just create an item with this function. How do i just create an item? any reply is appreciated.  

How to dynamically create HTML file from the code ?

Hi all,Precisely and concisely, I have aspx page that has only one button "Generate". If the user clicked on this button, one HTML page should be created. The created HTML page should have title "Home" and the Body should contain "Hello World". 1) What is the code that should be written inside "Generate" button in order to accomplish this functionality? 2) Assuming the HTML page gets created, How to store it inside specific folder on the local drive? Or how to store it inside DB? I would greatly appreciate any constructive input!

Create Excel file dynamically in SSIS package and fill it by resultset data returned by Stored proce


Hello Every One,

I have a scenario in which i am executing a Stored Procedure which returned a result set.

I want to create a Excel file [name_date_time] dynamically, and fill result set data into Excel file. And then finally sent Excel file to Specific user[Email ID].

Point is that the excel file should have unique name so i want to give name as name_date_time.

So every time when package run new file is created with unique name.


Can any one suggest me who to create Excel file and fill result set data into Excel file.

And then finally send that Excel file ?







When dynamically creating an excel file, can SSIS create xlsx files successfully? I can only get SSI


Problem: An Excel file (XLSX) dynamically created by a SQL Task cannot be opened via Excel. The task succeeds, but when you try to open the workbook in Excel you get the fillowing error message: Excel cannot open the file 'myfile.xlsx" because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.

1. If the Excel file (xlsx) is created manually in Excel, then the SQL Task has no problem creating table (new worksheets) in the xlsx (so the "CREATE TABLE" statement works fine)
2. If I adjust the connection and task to work with Excel 97-2003 (xls) format then the approach works perfectly
3. The execution results show success of the SQL Task, but there are two warning messages. These same warnings appear when the SQL Task creates a new table (worksheet) successfully in a workbook (xlsx) which was created manually in Excel (and is not corrupt). Messages as follows:
Warning: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
Warning: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

SSIS Details:
1. ConnectionString: "Data Sour

Trying to create a unique workflow for every item in a library.

Hi all,

I'm trying to create a seperate collect feedback, collect approval, and send notification upon approval workflow for every document in a document library (you can imagine my terror when this was assigned).

I'm having trouble creating a seperate workflow for each document in a library.  Initially I started by creating a workflow in SPD that is triggered when an item is changed in the library and then looks for the title of the document to match it's parameter.  However, I was having a problem with the emails.  I would collect feedback, output a variable, but when I put that variable into an email body, all I would get was a number in the email.  But that's another issue for another thread I suppose. 

I also tried creating a different content type for each document.  However, for some reason the first content type I created appears in the drop down menu when I try to change a documents properties, but not the rest of the content types I created.

Any help will be greatly appreciated.  Thank you.

Create list item in library - Output variable



I want to create workflow in SPD, that create new item in document library.

I use Create list item on library (output to Variable:create)

The documenty was created sucessfully, but the output didn't return the ID of item created.

In the documentation says, that function return the ID of item created.

Is maybe some other way, to get the ID of new created item in document library.


Best regards

Upload a File to a SharePoint Document Library - Part I

The following helper class demonstrates a few techniques that allow documents to be uploaded to a SharePoint document library programmatically without using the API or a custom web service. You don't need to specify a document library name, and it will create any folders specified in the URL as required. File meta data will be updated if any properties are passed.

Dynamically Create Controls in ASP.NET by Using Visual C# .NET

This article demonstrates how to dynamically create a control for an .aspx page. The sample project does the following:
Creates two TextBox controls.
Verifies that the contents (TextBox.text) and the attributes of the TextBox are saved across posts to the server.
Illustrates handling events that are posted by a dynamically-created control

Dynamically Create Controls in ASP.NET with Visual Basic .NET

This step-by-step article describes how to dynamically create controls for an ASPX Web page.

The sample project does the following:
It creates two TextBox controls.
It verifies that the TextBox contents (TextBox.text) and attributes are saved across posts to the server.
It describes how events that are posted by a dynamically created control are handled.

Problem in accessing resource file dynamically.


Steps I have followed are
1.I have created myres.en-GB.resx file at C:.
2.then created locale specific myres.en-GB.resources using resgen at c: only,
resgen c:\myres.en-GB.resx
3.Linked the Resource File to Assembly using AL.exe which is giving me assembly at c: only.
Al /t:lib /embed:myres.en-GB.resources /out:ClassLibrary1.dll
4.I have created one web application using vs 2008 & then build it.
5.Then placed both resource file & dll in web applications Bin\en-GB folder.
6.Anf finally written code at page load like
 CultureInfo info = new CultureInfo("en-GB");
            Thread.CurrentThread.CurrentCulture = info;
            Assembly asd = Assembly.Load("ClassLibrary1");
            ResourceManager res = new ResourceManager("myres.en-GB", asd.GetSatelliteAssembly(info));
            string sdf = res.GetString("Lab1");

but after running application I m getting following error
MissingManifestResourceException", "Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Cla

Visual Studio 2005: Create Reusable Project And Item Templates For Your Development Team


Visual Studio 2005 introduces a new model that lets you define your own project templates and starter kits, something developers have been requesting for some time. Here Matt Milner shows you how to consume, create, and customize these templates.

Matt Milner

MSDN Magazine January 2006

file upload in Create User Wizard Created User event with UpdatePanel Tag wont work?



In my Create User Wizard1 Created User Wizard Event, I am collecting extra information from text boxes and allowing

the user to uplad a file.



I have put the Submit button within an Update Panel Tag but since I have done this it does not work.

Is there a way round it. In this situation would you use a trigger.?


<br />

  <asp:UpdatePanel ID="UpdatePanel2" runat="server">

  <asp:Button ID="StepNextButton" runat="server"  CommandName="MoveNext"  align="middle"
                                            Text="Submit my Profile" />

VS2010 Express ASP.net and database file with SQL Authentication - How to create database file with


Hi, I have installed Visual Studio 2010 Express in my local system.

Steps 1. File->New Website

 2.Open datbase explorer, right click on dataconnection

 3.Select Create new connection

 4.use Microsoft SQL Server Database file

5. Type new databse filename

6. Now i want to use SQL authentication which is not working

 7.If we use windows authentication its wokring without any problem

8.But i need sql authentication to be used.

 9.I have not installed SQL studio.

 I am only using the one which is packaged in VisualStudio 2010 SQLClient. Let me know how can we create a new database file with userID and password. So that i can host it in other systems as well without any windows authentication.  I know that VS2010 setup also installs the SQL client which is requiredto create and manage sql databse files/quries etc


i dont know the default userID and password for SQLauthentication. As the express setup did not asked any credentials while installing SQL components


Thanks and regards

 Mahesh kotekar


how to call an dll file dynamically from (.cs )


i have  an  microsoft .office.interop.excel(dll) located  at an directory d:\abc\.  now i do not want to add them  as an web reference in my projet   and  call them

rather  call the dll dynamically  from my code behind(.cs)
is ther any way  we can do dynmically

 anyhelp would be  great
 thank  you

File Attachments from info-path forms to Sharepoint document library


Hi Experts,

How to upload file attachements from info-path forms to Sharepoint document library?

I need to add attachement from local-PC/Any User to Sharepoint Document Library.


Any help please?? Appreciated




ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend