?
Solved

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

Posted on 2014-02-20
11
Medium Priority
?
2,788 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 

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
 
LVL 1

Assisted Solution

by:tolppa
tolppa earned 1336 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 19

Expert Comment

by:Walter Curtis
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 19

Assisted Solution

by:Walter Curtis
Walter Curtis earned 664 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 1336 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

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

752 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