Changing an ICN file type filter name

Have you ever changed a File Type filter name in ICN? Well don’t, that’s not pretty. All the associations of Entry Templates you’ve done on folders will just stop working, or at least stop offering the user the right Entry Template for the document’s MIME Type. In the configuration it looks like this:

icn_filetype_filter_broken

Explanation is simple. In ICN, apparently there is no ID for File Type filter, or more specifically the name is the ID, which means where you are doing an Entry Template association in ICN, an JSON object is stored as a folder preferences annotation, persisting the File Type filter name directly. Of course if you change the File Type filter name, they won’t look for all folder preferences annotations and change the File Type filter name in it, which means they will all be broken.

If you don’t use Entry Template association, you can change the name without any fear, if you do use them, best is just avoiding changing them. If you really have to, then you will have to develop a tool looking for all folder preferences annotation containing entry template associations (I’ll help you, MIME Type is ‘application/x-icn-folderprefs-templates’ in class Annotation), parse the JSON and look for association using the File Type filer’s old name and change it with the new name, then save the new JSON content in the annotation.

This is how looks an entry template association annotation for ICN:

[
    {
     "currentFolderAsParent":true,
     "isDefault":false,
     "fileTypes":["IBM DITA Test"],
     "type":"document",
     "entryTemplateVsId":"{E9986DA5-1082-4B73-B7A3-C9B996962F4E}"
    },
    {
     "currentFolderAsParent":true,
     "isDefault":false,
     "fileTypes":[],
     "type":"document",
     "entryTemplateVsId":"{5E26863D-5E46-40E4-AC3A-698192FBD473}"
    }
]

Weird thing is that in Workplace XT, File Type Categories were using id plus name, and changing the name was all right. Apparently they didn’t do the same in ICN.

Leave a Reply