You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.
The validation formula of fields need to have display names of a field and not an internal name.
Observed Behavior
We get error "The formula cannot refer to another column. Check the formula for spelling mistakes or update the formula to reference only this column." when we apply a template generated by the provisioning engine. The field is a normal text field that belongs to a list (not a Site Column) and that has a validation formula. The field was created in UI and functioning fine. We found that when we get a SchemaXml of a field, the validation formula contains InternalName of a field, but when a field is created using AddFieldAsXml method, validation formula is expected to have DisplayName of a field in square brackets. So it's not really a problem with proivisioning engine, but nevertheless, it crashes when applying a template.
Steps to Reproduce
Create a text field in a list and add validation formula that refers to the same field.
Generate a provisioning template from the site with the list
Apply generated provisioning template to another site.
Sample field xml from the provisioning template which is in a :
Category
[ x] Bug
[ ] Enhancement
Note: it's not a bug because of a provisioning engine but because of how SharePoing handles validation formulas.
Environment
[ x] Office 365 / SharePoint Online
[ ] SharePoint 2016
[ ] SharePoint 2013
Expected or Desired Behavior
The validation formula of fields need to have display names of a field and not an internal name.
Observed Behavior
We get error "The formula cannot refer to another column. Check the formula for spelling mistakes or update the formula to reference only this column." when we apply a template generated by the provisioning engine. The field is a normal text field that belongs to a list (not a Site Column) and that has a validation formula. The field was created in UI and functioning fine. We found that when we get a SchemaXml of a field, the validation formula contains InternalName of a field, but when a field is created using AddFieldAsXml method, validation formula is expected to have DisplayName of a field in square brackets. So it's not really a problem with proivisioning engine, but nevertheless, it crashes when applying a template.
Steps to Reproduce
Create a text field in a list and add validation formula that refers to the same field.
Generate a provisioning template from the site with the list
Apply generated provisioning template to another site.
Sample field xml from the provisioning template which is in a :
=(LEN(LEFT(Email,FIND("@",Email)-1))>0)+(LEN(RIGHT(Email,LEN(Email)-FIND(".",Email,FIND("@",Email))))>0)+(LEN(MID(Email,FIND("@",Email)+1,FIND(".",Email,FIND("@",Email))-FIND("@",Email)-1))>0)+(ISERROR(FIND(" ",Email))=TRUE)=4
The text was updated successfully, but these errors were encountered: