ISHRemote - How can I get a count of logical layer only ignoring language and version layers?

Hi,

I am trying to get a list of the objects in all folders with the name Global Topics.

I don't want to know all the language and version layers, just the unique GUIDs.

How do I filter the objects returned by 

$folderObj = Get-IshFolderContent -ISHFolder $folder

$ishobjects = Get-IshDocumentObj -IshObject $folderObj

to not include every version and language layer

Any advice appreciated,

Regards,

Ann

  • Hi Ann,

    In essence your $ishobjects parameter holds .NET objects where you can use .NET and/or PowerShell standard cmdlets to solve the problem.

    $ishobjects | Select-Object -Property IshRef -Unique

    Where IshRef is a property on every object in your $ishobject aray... just print $ishobject[0] to check what is inside your first array entry.

    As you are only interested in the logical level (unique GUID), you could put extra filters on Get-IshFolderContent to retrieve less data from the database: Get-IshFolderContent -VersionFilter LATEST

    -Dave

  • Hi Dave - can someone at RWS help us get the number of objects in our repository? We don't have anyone on staff familiar with ISH Remote. What's the best way to get an object count?

    emoji
  • Elizabeth,

    I can you get someone to login into the underlying RDBMS, you can run following query to get all the counts

    select (select count(*) from card c1 inner join card c2 on c1.TYPE_CARD_ID = c2.CARD_ID and c2.is_name = 'CTIMG') as 'Number Image Logicals',

           (select count(*) from card c1 inner join card c2 on c1.TYPE_CARD_ID = c2.CARD_ID and c2.is_name = 'CTIMGV') as 'Number Image Versions',

              (select count(*) from card c1 inner join card c2 on c1.TYPE_CARD_ID = c2.CARD_ID and c2.is_name = 'CTIMGL') as 'Number Image Languages',

           (select count(*) from card c1 inner join card c2 on c1.TYPE_CARD_ID = c2.CARD_ID and c2.is_name = 'CTLIB') as 'Number Library Topic Logicals',

              (select count(*) from card c1 inner join card c2 on c1.TYPE_CARD_ID = c2.CARD_ID and c2.is_name = 'CTLIBV') as 'Number Library Versions',

              (select count(*) from card c1 inner join card c2 on c1.TYPE_CARD_ID = c2.CARD_ID and c2.is_name = 'CTLIBL') as 'Number Library Languages',

              (select count(*) from card c1 inner join card c2 on c1.TYPE_CARD_ID = c2.CARD_ID and c2.is_name = 'CTMAP') as 'Number Topic Logicals',

              (select count(*) from card c1 inner join card c2 on c1.TYPE_CARD_ID = c2.CARD_ID and c2.is_name = 'CTMAPV') as 'Number Topic Versions',

              (select count(*) from card c1 inner join card c2 on c1.TYPE_CARD_ID = c2.CARD_ID and c2.is_name = 'CTMAPL') as 'Number Topic Languages',

              (select count(*) from card c1 inner join card c2 on c1.TYPE_CARD_ID = c2.CARD_ID and c2.is_name = 'CTMASTER') as 'Number Map Logicals',

              (select count(*) from card c1 inner join card c2 on c1.TYPE_CARD_ID = c2.CARD_ID and c2.is_name = 'CTMASTER') as 'Number Map Versions',

           (select count(*) from card c1 inner join card c2 on c1.TYPE_CARD_ID = c2.CARD_ID and c2.is_name = 'CTMASTERL') as 'Number Map Languages',

              (select count(*) from card c1 inner join card c2 on c1.TYPE_CARD_ID = c2.CARD_ID and c2.is_name = 'CTPUBLICATION') as 'Number Publications',

              (select count(*) from card c1 inner join card c2 on c1.TYPE_CARD_ID = c2.CARD_ID and c2.is_name = 'CTPUBLICATIONV') as 'Number Publication Versions',

              (select count(*) from card c1 inner join card c2 on c1.TYPE_CARD_ID = c2.CARD_ID and c2.is_name = 'CTPUBLICATIONOUTPUT') as 'Number Publication Outputs'

    emoji