Solved

How to get SharePoint List to show "Created By" on new item form

Posted on 2014-02-20
11
2,318 Views
Last Modified: 2014-03-04
I have a 2010 sharepoint list that is setup to only ask for 2 columns on the new item form. Originally, one of my fields was the "Created By" column, but I set that up to populate the users work email in the List view.  I believe I then hid that column from the form view.

Since some users are using my sharepoint list from a "guest" account, I now need to have the "Created By" column in the form view so they can enter in their email address, but I cannot figure out how to get it back.  Please help!
0
Comment
Question by:Dominator1025
  • 4
  • 4
  • 2
  • +1
11 Comments
 
LVL 7

Expert Comment

by:jaynee
ID: 39875534
What did you use to "hide" the column in the form view? Did you modify any of the default .aspx pages?
0
 

Author Comment

by:Dominator1025
ID: 39875789
I believe I just switched the setting from optional to hidden, but now when I go back to that screen, I don't get those options.
0
 
LVL 1

Expert Comment

by:tolppa
ID: 39877350
Hello. Perhaps powershell will be your friend. Please check if this help you. This article shows how to hide SharePoint list field from newform so you need to do something like:  $Field.ShowInNewForm = $true; If this does not solve your problem use sharepoint manager to examamine problematic list. Please do not use sharepoint manager to change settings because this will possibly deny microsoft support.

Also, understand that hidden field attribute completely hides the field from the user interface. You need to use powershell to change the value back to false.
0
 

Author Comment

by:Dominator1025
ID: 39877371
Thanks Tolppa.  I have never used powershell. How do I find/use powershell and that code?  With a little direction, I should be able to get this done, looks simple enough.
0
 

Author Comment

by:Dominator1025
ID: 39877414
I have found the powershell prompt, but now I can't find the GUID of the "Created By" column. I can find the other columns GUID in SharePoint designer, but I don't have it for this column.
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 1

Assisted Solution

by:tolppa
tolppa earned 334 total points
ID: 39877688
If you do not have access to server you should propably ask administrator to help you out with this. PowerShell may not be what you need to solve the problem but it do make things simpler once you learn how to use it. ***Please always understand the script before you do anything against your production sharepoint***  because Poweshell is efficient enought to broke sharepoint,

You can basically start powershell (windows start menu > PowerShell), but  I like to use PowerShell Integrated Scripting Environment (ISE) because ISE allows much better user experience. Short googling should be enought to get started. For example, PowerShell ISE: Not Installed By Default in Windows Server 2008 R2 shows how to enable ISE in Windows Server 2008 and Where is the PowerShell ISE in Windows 8? shows how to enable ISE in Windows 8. Go ahead and give powershell command Write-Host "hello world" to see that everything works.

After that it is all about Copying & Pasting. You need to replace $WebUrl, ListName and $FieldGuid to match your evinroment. $FieldGuid may be little bit tricky but you use your favourite sharepoint tricks to get it (list settings > edit field > check the url, powershell or sharepoint manager).

Please note that I did light editing. I added Get-PSSnapin "Microsoft.SharePoint.PowerShell" Snap-In because powershell needs load "sharepoint support". Also, I added $web.Dispose(); because I like to know sharepoint site will not exist in server memory after I do not need it anymore. Finally I removed everything but $Field.ShowInNewForm = $true; because you should not need them.

if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) 
{
    Add-PSSnapin "Microsoft.SharePoint.PowerShell"
}

$WebUrl = "http://sitecollectionurl"
Write-Host "Opening Web" $WebUrl
$web = Get-SPWeb $WebUrl
$list = $web.Lists["ListName"];
$FieldGuid = New-Object System.Guid("cc9576b6-a166-47c9-bd89-7f47a3237e03");
$Field = $list.Fields[$FieldGuid];
$Field.ShowInNewForm = $true;
$Field.Update();
$list.Update();
$web.Dispose();

Open in new window



I would remommend that you to take a big mug of coffee and skim throught these web pages: Using Windows PowerShell, Getting Started with Windows PowerShell.  I know it's a boring subject, but powershell will easily grow to be your best friend. You can use powershell to "power manage" your sharepointevinroment so your time will not be wasted.
0
 
LVL 1

Expert Comment

by:tolppa
ID: 39877716
I believe you will like this SharePoint: A Complete Guide to Getting and Setting Fields using PowerShell. You will want to know the ID column. Of course Powershell should give you the answer you need: http://get-spscripts.com/2010/08/find-guid-of-site-column-using.html
0
 
LVL 14

Expert Comment

by:SneekCo
ID: 39878099
The created by column is a system column. It is metadata that can not simply be modified. You can add an addition column to your list, using a single line of text (because of your external users) and have users add their information in that column..

Hope that helps
0
 

Author Comment

by:Dominator1025
ID: 39878113
SneekCo - thanks, I find it really odd that I was able to hide "Created By" from my new item form, yet still display it in my all item view (which was my goal) but now I can't get it back to my new item form.   Is this simply a flaw with SharePoint out of the box, or am I missing something?

I'm not sure I have the time to work through what looks like a good option with PowerShell. I will probably rebuild my list from scratch on Monday if I can't find an easy solution.
0
 
LVL 14

Assisted Solution

by:SneekCo
SneekCo earned 166 total points
ID: 39878145
On the new item form there is not yet a "created by" system because it has not "been created" yet, so to say. And I am referring to the system generated "Created by" field. If you want a single line or text column or a person column as a form or custom "created by", then that would work.

Also, for what it's worth, it is easier to recreate than troubleshoot if you are not talking about a lot of columns.

Good luck
0
 
LVL 1

Accepted Solution

by:
tolppa earned 334 total points
ID: 39879621
You may want to check if you can see the field using Site Settings pages for managing site columns and content types. ReadOnly totally hides the field so that the field can be only used in views. That said I do not know if its possible to accidentally change the field state to read only.

You said that you set the "Created By" column to populate the users work emails. I would consider not to use system fields like that because because sharepoint may update these values (unlikely).

I believe SneekCo gave you nice solution. Just make sure you do not leave System fields to weird state because they may create problems future.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article will show you how to use shortcut menus in the Access run-time environment.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This video shows and describes the main difference between both orientations in Microsoft Word. Viewers will understand when to use each orientation and how to get the most out of them.
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now