Hi,
I am just new in PowerBI for projectwise. I try to update the description of document. But I can not change it with Attribute update failed:0.
The part of code I am using is
[object]$allPwDocuments = Get-PWDocumentsBySearch -Environment "Rendition Attributes"
[int]$numPwDocs = $allPwDocuments.Count
[System.Collections.HashTable]$yesAttributes = @{}
$yesAttributes.Add("LATEST_RENDITION_REV", "Noo")
Write-Host "$numPwDocs documents returned."
foreach ( $pwDocument in $allPwDocuments )
{
#Write-Host $pwDocument.Name
if ($pwDocument.Name -eq "SMCSWTSE-JAB-TPW-CW-DRG-706707-A.5.pdf" )
Write-Host $pwDocument.Name
Write-Host $pwDocument.Description
#Update-PWDocumentAttributes -InputDocuments $pwDocument -Attributes $yesAttributes
#Update-PWDocumentAttributes -InputDocuments $pwDocument -Attributes @{LATEST_RENDITION_REV="Yess"; Description="ferferre"}
Update-PWDocumentAttributes -InputDocuments $pwDocument -Attributes @{Description="ferferre"}
}
The error I had is
SMCSWTSE-JAB-TPW-CW-DRG-706707-A.5.pdf
SMCSWTSE-JAB-TPW-CW-DRG-706707-----
Attribute update failed: 0
ProjectID : 15716
DocumentID : 1
DocumentGUID : 9bfe29ea-9998-44f8-972d-a5f5eec22798
DocumentGUIDString : 9bfe29ea-9998-44f8-972d-a5f5eec22798
DocumentURN :
FileName : SMCSWTSE-JAB-TPW-CW-DRG-706707-A.5.pdf
FullPath :
Version : A.5
OldVersion : A.5
VersionSequence : 0
OriginalNumber : 0
Workflow :
WorkflowState :
DocumentStatus :
CheckedOutLocalFileName :
CopiedOutLocalFileName :
Description : SMCSWTSE-JAB-TPW-CW-DRG-706707-----
Name : SMCSWTSE-JAB-TPW-CW-DRG-706707-A.5.pdf
OldName : SMCSWTSE-JAB-TPW-CW-DRG-706707-A.5.pdf
OldFileName : SMCSWTSE-JAB-TPW-CW-DRG-706707-A.5.pdf
OldDescription : SMCSWTSE-JAB-TPW-CW-DRG-706707-----
OldFullPath :
AttributeRecordCount : 0
Attributes : {}
NestedReferenceCount : 0
CustomAttributes : {}
Hi All,
I just find there are two "Description". One in the Basic Colomn, and the other is in the Redition Attributes (assume it is custom attribute).