Calculated Value in Default value for Folder Name in SharePoint 2013 - expression

I'm using SharePoint 2013.
I have a document library with folders inside it.
I want to add a column to the folders that holds the folder's name.
I added a column of type single line of text.
What do I need to write in the Default value part in the Calculated value text box?
All I need is that when I upload a file to this folder I will see the folder's name in the column.
Thank you in advance!

IMO this is not possible as calculated fields can only address the same item's properties.
I would strongly suggest to check out Document Sets in SharePoint. They actually are there for those needs because you can configure which columns your files will share with the document set (which is actually a folder). After configuration, you can add an item and that item will take over metadata from the parent (document set).
Hope this helps you

Related

Xpages valuePicker add value

Is there a way to add a field into the valuePicker with the possibility of adding new values in it? The valuePicker get's the values from a view, and I wouldn't want to add another addButton to add some values withing that view, in separate way. I would like a dialogBox like the valuePicker + the option to add new documents withing it. It is possible?
That functionality isn't available in the Value Picker. It's unlikely to be added, because of the variety of dataProviders, which makes it difficult to know where to add the option to make it available to other documents, and also ensure validation of options.
Typeahead on an Edit Box control allows you to add entries not in the list.
Alternatively, you can add a separate Edit Box to your XPage to include a value not in the list. But if you want to store the new option in the same field, you'll need to write the code to add the option to the source of the list. E.g. if it's the dataProvider of your Value Picker is a dominoViewValuePicker, you'll need to create a document in that view as well; if it's a simpleValuePicker, you'll need to compute the options so they also look to this field. Otherwise, when the user edits the document again, the option will not be available in the list, so may get removed.
Why do you want the user to insert new values into a field in valuePicker? Instead, let the user add the new value direct into the field which is the valuePicker related to.

Possible to programatically specify Windows Explorer display columns and column order?

I have a program that creates a large and complex file structure from information in a database. The folders have cryptic names so to assist the user I add a Title attribute for each folder (using desktop.ini). When the Title column is the first column of the listing in Windows Explorer the display is perfect.
The problem is that each user must understand how turn on the display of the Title column and reorder the columns so that Title is the first column, otherwise they see only the cryptic name of the folder.
Is there anyway I can have my program write information into the root folder (or anywhere else) that will configure each copy of Windows Explorer, by default, to present the custom view of the folder that I want?

Remove Control Array Designation At Design Time

During design time when creating a form, I accidentally created a control array. That control was copied and pasted to several other controls. Is it possible to remove the control array designation without deleting and re-creating the controls?
This is all at design time.
If you have ended up creating a Text3 control array with 5 elements, the easiest way to correct this by hand is to rename the elements one by one to unique names and then clear the Index property of each one.
If you are cautious and you know what you are doing it can be faster to edit the .FRM or .CTL file in Notepad.

Creating SharePoint 2013 Lookup List Column Visual Studio 2012 List Designer

I'm trying to use the Visual Studio 2012 SharePoint 2013 List designer to create a lookup field but it is not working
Using the designer I created a simple list (Ad Agencies) with a column (Agency Name) that I want to appear as a lookup column in a second list.
Again, using the designer I created another list and add a Lookup column. Then using the property pane I set the following Properties for the Lookup column under "Type".
List: Ad Agencies
ShowField: Agency Name
I deploy the solution and add an item to the Ad Agencies list. I then add an item to the other list but the lookup Ad Agency column contains nothing.
I am hoping someone can spot what I may be doing wrong sinse this seems so straight forward.
Thanks for reading
Solution
In your lookup column properties (i.e. using Property Pane), use below values:
List: Lists/Ad Agencies (Note: we are using "Lists/" before the list name)
ShowField: AgencyName (Note: there is no space between Agency and Name)
More Info
List:
This is "List URL (site-relative URL)" value of your parent list; found under "List" tab in visual studio 2012's list designer
ShowField:
This is name property value of your field in parent list that is to be used as ShowField (as shown in property pane) (note: this is not "display name" property value)
Please refer the below blog post for more
http://jsuhail.blogspot.com/2014/08/add-lookup-column-through-visual-studio.html
Ok I found the issue I was having. I was renaming the title Column. Do not do this. It causes all kinds of problems when trying to add list items using the list view as well.
If you rename the initial title field you have to reference it as
List: Lists/"Your List URL"
ShowField:Title"
no matter what you change the title name too. Oh don't get any ideas about changing the static name in the schema either. This does nothing but confuses SharePoint. Oh you can change the view to display your renamed title field but when editing it using the list edit view. SharePoint get confused.
It is best to delete the initial column and create a new one. Then you wont have any issues at all.
I repeat DELETE the initial column named Title. Then create your own if you do not wish to use the title field.

Creating Custom List Definition using VS 2010 without creating Custom Content type

I want to create Custom List Definition without creating custom content type. Way I followed is created farm solution without list instance -> In the elements.xml file I gave 10005 as a type and in the Schema.XML in the section I added custom fields and also in the default view as well. When I deployed this project and created list based on this definition and clicked on the "New Item" it didnt show Custom Columns but only the Title Column. To solve this I removed whole content type section from the Schema.XMl and deployed the solution again. I created list based on the List definition this time clicking on the "New Item" link in the list view it shows all the custom columns but when I go to ribbon and click on the "New Item" drop down it does not show "New Item" but it shows the name of the list instead and also it adds the name of the list as a content type. I can understand this behaviour as I removed content type section from the Schema.XML but how can I add custom columns to Item Content type ?
In the Schema.xml file you need to:
Declare the fields inside the Fields node (the same way you would if you were creating site columns)
Update the default view to show the newly created fields (if necessary)
Delete the ContentTypes node
I cover this in detail in the Creating Lists using CAML module of my Pluralsight SharePoint 2010 Lists and Libraries for Developers course. You could watch it using a trial subscription.

Resources