none
Can't set a default value for a field of a User type to "Modified By" built-in field in Sharepoint through XML.

    Frage

  • I have the following field definition in XML:

        <Field ID="{296A3A12-9B0A-43AB-94D0-D2905300000}" Group="MyGroup" Name="Publisher" Type="User" SourceID="http://schemas.microsoft.com/sharepoint/v3"  DisplayName="Publisher" List="UserInfo" >
        <DefaultFormula>=[Editor]</DefaultFormula>
        <FieldRefs>
          <FieldRef ID="{d31655d1-1d5b-4511-95a1-7a09e9b75bf2}" Name="Editor" />
        </FieldRefs>
      </Field>

    Here the "Editor" is the name of the built-in field commonly known as "Modified By". However, when I try to add the content type containing the field defined above to a Document Library, I get the following exception:

    "The formula refers to a column that does not exist.  Check the formula for spelling mistakes or change the non-existing column to an existing column.<nativehr>0x81020057</nativehr><nativestack></nativestack>"

    So, clearly the "Editor" field is not recognized as the valid field, even though it clearly is valid and exists. I even dug into a 14-hive and made sure that it exists.

    Can anyone tell me what I'm doing wrong?

    Thanks a lot in advance.

    Samstag, 28. April 2012 01:40

Alle Antworten