locked
Validation uses wrong field name / How to change field name RRS feed

  • Question

  • We recently enabled required fields in a SharePoint list. When users are saving the form without specifying a value for it, the InfoPath form is providing the error message that validation fails because "My:NewColumn1" requires a positive integer.  This doesn't help the user much because they don't know which field NewColumn1 is.

    I tracked the issue down to a column that is labeled as "Primary Country". Although the label is correct, it appears the actual field name is "NewColumn1", hence the issue.

    So, is there a way to rename the field so that it can be updated to be "Primary Country" and consistent with the label? Below is a screenshot of the field definition from Infopath. I can't see a way to rename the field in SharePoint Designer or SharePoint UI.

    Monday, November 26, 2012 6:12 PM

Answers

  • Hi

    You can try using Powershell

    $web = Get-SPWeb -site "http://<site where list is located";
    $list = $web.Lists["Your list name"];
    $field = $list.Fields["NewColumn1"];
    $field.Title = "Primary Country";
    $web.AllowUnsafeUpdates = $true;
    $field.Update();
    $field.AllowUnsafeUpdates = $false;


    Kind Regards

    Bjoern
    http://spviking.com
    Twitter: Follow @bjoern_rapp


    • Edited by Bjoern H Rapp Monday, November 26, 2012 9:22 PM
    • Marked as answer by Emir Liu Thursday, December 6, 2012 7:37 AM
    Monday, November 26, 2012 9:21 PM