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
Wondering if any one can shed some light ... I have a calculated column that uses the following formula:
=IF([Archive File]<>"Yes","Archive",(IF(AND([Archive File]="Yes",[Archive Processed]=FALSE),"Archiving in Progress","Archived")))
As you can see it references two additional (custom) columns (Archive File and Archive Processed). This formula works fine. I am now trying to use PnP to provision my columns and associated content types, and so I am using Add-PnPFieldFromXml to create my calculated column. Within my code the XML for the column is generated as follows:
which resolves to:
=IF([Archive File]<>"Yes","Archive",(IF(AND([Archive File]="Yes",[Archive Processed]=FALSE),"Archiving in Progress","Archived")))
When I deploy the column using Add-PnPFieldFromXml the cmdlet executes without error and the column is created. However, when I look at the formula after creation it appears as follows:
Note how the referenced columns don't seem to resolve, yet they are clearly there (visible in the column selector list -- and they were created BEFORE I try to deploy my column that references them). If I modify my formula to use the out of the box Title instead, the deployment works fine. Anyone know why I can't seem to reference custom columns via Add-PnPFieldFromXml or is there a special way they need to be referenced? I have tried using both the internal and the display names of the referenced columns and I get the same result either way.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello All,
Wondering if any one can shed some light ... I have a calculated column that uses the following formula:
=IF([Archive File]<>"Yes","Archive",(IF(AND([Archive File]="Yes",[Archive Processed]=FALSE),"Archiving in Progress","Archived")))
As you can see it references two additional (custom) columns (Archive File and Archive Processed). This formula works fine. I am now trying to use PnP to provision my columns and associated content types, and so I am using Add-PnPFieldFromXml to create my calculated column. Within my code the XML for the column is generated as follows:
which resolves to:
=IF([Archive File]<>"Yes","Archive",(IF(AND([Archive File]="Yes",[Archive Processed]=FALSE),"Archiving in Progress","Archived")))
When I deploy the column using Add-PnPFieldFromXml the cmdlet executes without error and the column is created. However, when I look at the formula after creation it appears as follows:
Note how the referenced columns don't seem to resolve, yet they are clearly there (visible in the column selector list -- and they were created BEFORE I try to deploy my column that references them). If I modify my formula to use the out of the box Title instead, the deployment works fine. Anyone know why I can't seem to reference custom columns via Add-PnPFieldFromXml or is there a special way they need to be referenced? I have tried using both the internal and the display names of the referenced columns and I get the same result either way.
Thanks in advance for any insights!
Beta Was this translation helpful? Give feedback.
All reactions