What to do with baseline names that contain newline and return characters?

I am finding that on rare occasions, when I get FISHBASELINE metadata for a publication, the baseline name has a carriage return and line feed in it. But if I then use this baseline name to request a baseline ID, the API returns an error that the baseline doesn't exist. If I strip the carriage return and newline characters, or replace them with a space, I get the same error. What should I do in these instances? How do I request the baseline ID for a baseline name that includes these characters?

Parents
  • Hi Mark,

    The CR/LF characters should not be in a baseline name, and we would advise to remove them if possible. Most likely they got in through a copy-paste from Excel or alike.

    Publication Versions holds the FISHBASELINE field, the FISHBASELINE field is a reference field (ISHType), which means it allows to retrieve its label (Value) but also its unique identifier (Element). The element value will not change when you rename the label. This also goes for usernames, you can rename them but the whole reference system behind the scene is not broken. See documentation

    So add requested metadata like this to retrieve the identifier immediately, avoiding the extra call.

    <ishfield name='FISHBASELINE' level='version' valuetype='element' />

     

     

    Advertisement :-) ... Now explaining this using the new version of ISHRemote v0.7, the field type would show as ISHType, see

    Get-IshTypeFieldDefinition | Where-Object -Property name -EQ -Value FISHBASELINE
    ISHType          Level    Name                      DataType             SDB  MM CRUS Description                                                            
    -------          -----    ----                      --------             ---  -- ---- -----------                                                           
    ISHPublication   Version  FISHBASELINE              ISHType              SDB  M1 CRU- Used on CTPUBLICATIONV to store the link to the baseline object used

     

    The example code using ValueType would look like this

    $metadataFilter = Set-IshMetadataFilterField -Level Lng -Name MODIFIED-ON -FilterOperator GreaterThanOrEqual -Value "01/01/2016" |
                      Set-IshMetadataFilterField -Level Lng -Name MODIFIED-ON -FilterOperator LessThan -Value "01/01/2017"
    $requestedMetadata = Set-IshMetadataField -Level Version -Name FISHBASELINE -ValueType Element
    $objects = Find-IshPublicationOutput -MetadataFilter $metadataFilter -RequestedMetadata $requestedMetadata
    $objects[0].fishbaseline_version_element
    Get-IshBaselineItem -Id $objects[0].fishbaseline_version_element

    -Dave

  • Thanks, Dave! I appreciate your time explaining the details. Very helpful.
Reply Children
No Data