Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Possible workaround to fix issue #849 #976

Merged
merged 1 commit into from
Jan 27, 2017
Merged

Conversation

luismanez
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
New sample? no
Related issues? fixes #849

What's in this Pull Request?

Possible workaround to issue #849. As described in the issue, this is not a problem with PnP Core. Problem is because the Field definition contains the Internal name of the field in the Validation Formula:

<Field Type="Text" Title="Validate Formula" DisplayName="Validate Formula" Required="FALSE" ID="{41e93963-b9c4-4f33-a8c4-8f1adbb4d40e}" SourceID="{{listid:PnP Issue 849}}" StaticName="Validate_x0020_Formula" Name="Validate_x0020_Formula" ColName="nvarchar3" RowOrdinal="0" Version="3" EnforceUniqueValues="FALSE" Indexed="FALSE" MaxLength="255">
    <Validation Message="Text must contain PnP">=ISNUMBER(FIND("PnP",Validate_x0020_Formula))</Validation>

However, with that Internal name, it raises an error when Provisioning, because is expecting the DisplayName. This workaround replaces the internal name by the Display name (enclosed with [])

@msftclas
Copy link

Hi @luismanez, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by Microsoft and real humans are currently evaluating your PR.

TTYL, MSBOT;

@VesaJuvonen
Copy link
Contributor

thx Luis, we'll have a look on this in upcoming days.

@Kenn-o
Copy link

Kenn-o commented Jan 28, 2020

Q A
Bug fix? yes
New feature? no
New sample? no
Related issues? fixes #849

What's in this Pull Request?

Possible workaround to issue #849. As described in the issue, this is not a problem with PnP Core. Problem is because the Field definition contains the Internal name of the field in the Validation Formula:

<Field Type="Text" Title="Validate Formula" DisplayName="Validate Formula" Required="FALSE" ID="{41e93963-b9c4-4f33-a8c4-8f1adbb4d40e}" SourceID="{{listid:PnP Issue 849}}" StaticName="Validate_x0020_Formula" Name="Validate_x0020_Formula" ColName="nvarchar3" RowOrdinal="0" Version="3" EnforceUniqueValues="FALSE" Indexed="FALSE" MaxLength="255">
    <Validation Message="Text must contain PnP">=ISNUMBER(FIND("PnP",Validate_x0020_Formula))</Validation>

However, with that Internal name, it raises an error when Provisioning, because is expecting the DisplayName. This workaround replaces the internal name by the Display name (enclosed with [])

I've found another workaround to this issue. In your validation formula, you can refer to the field in the following format:

[{fieldtitle:Internal Name}]

In your case, it would be [[fieldtitle:Validate_x0020_Formula]].

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants