Open sudheermadduru opened 6 years ago
I've been facing the same problem for month now. In 2017, the problem existed already. Now we're in july 2018 and it's still there. Sorry to be a bit rude but I always have columns with formulas which I cannot provision using PNP. This is becoming really annoying... The only solution I found for now is that I created a script that:
Have you tried using <FieldRef />
property in your `
<Field .... >
<Formula>=YEAR({Due Date})</Formula>
<FieldRefs>
<FieldRef Name="MyDueDate" ID="{GUID MyDueDate}"/>
</FieldRefs>
</Field>
Hi, I have the same problem with calculated columns. A workaround seems to be to replace all semicolons in the formula by commas.
Can you please check this workaround?
Notice: many issues / bugs reported are actually related to the PnP Core Library which is used behind the scenes. Consider carefully where to report an issue:
Apply-SPOProvisioningTemplate
orGet-SPOProvisioningTemplate
? The issue is most likely related to the Provisioning Engine. The Provisioning engine is not located in the PowerShell repo. Please report the issue here: https://github.com/officedev/PnP-Sites-Core/issues.Reporting an Issue or Missing Feature
The formula contains a syntax error or is not supported.
Expected behavior
Should be able to create calculated column using PnP Powershell
Actual behavior
Add-PnPFieldFromXml: The formula contains a syntax error or is not supported.
Steps to reproduce behavior
I am using below formula and able to through browser in the calculated.
=IF(Nom="";"";Nom&" ")&Prenom&IF(Fonction="";"";", "&Fonction)&IF(Entity="";"";", "&Entity)
All the fields and result type is of type text
Below is the format that is being used to create calculated column using PnP Powershell
$string='=IF(Nom="";"";Nom&" ")&Prenom&IF(Fonction="";"";", "&Fonction)&IF(Entity="";"";", "&Entity) =IF(Nom="";"";Nom&" ")&Prenom&IF(Fonction="";"";", "&Fonction)&IF(Entity="";"";", "&Entity) '
Add-PnPFieldFromXml -List "listname" -FieldXml $string
Which version of the PnP-PowerShell Cmdlets are you using?
What is the version of the Cmdlet module you are running?
(you can retrieve this by executing
Get-Module -Name *pnppowershell* -ListAvailable
)How did you install the PnP-PowerShell Cmdlets?