Can't change the value of a field in a publication object with ISHRemote

Using ISHRemote v0.13-beta, Tiridion Docs 14 sp3.

I want to change the copyright year in a publication. I'm using a pattern I found in the docs, like this:

$metadataUpdate = Set-IshMetadataField -IshSession $ishSession -Name filoxcopyrightyear -Level lng -Value '2022'

Set-IshPublicationOutput -IshSession $ishSession -LogicalId "GUID-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -Version "1" -OutputFormat "Tech Manual-2" -LanguageCombination "EN-US" -MetaData $metadataUpdate

--------------------------

But Set-IshPublicationOutput just returns this:

ISHType          Title                                    LogicalId                                 Version Lang  OutputFormat  Status      
-------          -----                                    ---------                                 ------- ----  ------------  ------      
ISHPublication   5996999 Clean Registration F9...         GUID-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 1       EN-US Tech Manua... Draft

And when I check in the Tridion web client, the copyright year has not changed. I know I'm missing something. Please advise.

Thanks, Mark

Parents
  • What you wrote down looks fine... as an object was returned, it means an object was found to do the operation on... it didn't return an error of some kind. I'm going to assume that custom field "filoxcopyrightyear" exists and is correctly spelled.

    Can you reexecute but add -Verbose -Debug, depending on your system settings they might challenge with confirmation boxes to allow step by step execution. For ISHRemote it just means to print more logging what is happening, hopefully is connects the dots for you, if not please share full logging on this thread

    Set-IshPublicationOutput -IshSession $ishSession -LogicalId "GUID-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -Version "1" -OutputFormat "Tech Manual-2" -LanguageCombination "EN-US" -MetaData $metadataUpdate -Verbose -Debug

  • Thanks Dave, adding the -Verbose -Debug helped me fix it. Part of the verbose output said it did not recognize my field "filoxcopyrightyear":

    VERBOSE: SetIshPublicationOutput  ToIshMetadataFields skipping unknown ishType[ISHPublication] level[Lng] name[filoxcopyrightyear] valueType[Value]

    So instead I typed my field name in all caps, FILOXCOPYRIGHTYEAR, because I've seen so many other fields spelled that way, and that worked!

    But my question now is, why does it require all caps for this field name? I can read that same field from the shell with something like this and it is recognized:

    PS C:\Users\mark> $mypub[0].filoxcopyrightyear
    2019

    And when I do $mypub[0] | Get-Member, the fields it shows are also lowercase. Did I miss something in the docs?

  • Hi Mark,

    ISHRemote is connecting two paradigms

    • on the one hand the Tridion Docs web services including uppercase field names, levels (logical/version/language/none) and value types (id/element/value)
    • on the other side we have PowerShell, the reason that 2+ PowerShell libraries can work together nicely. This results in properties, automatic tables, pipeline cmdlets, etc

    The lowercase read-only property on returned objects is a convinience to interact with PowerShell. Way before my time, the system was setup with upper-case field names, these days those screaming field names are less pleasing to the eyes :-) ... plus the properties you use also offer field-level and valuetype information and sortable dates as well.

    Some more details are described on https://github.com/RWS/ISHRemote/releases/tag/v0.7 in section General

    -Dave

Reply Children
No Data