Master Keyword List


Hi again,

Sorry for the constant questions but I’ve got yet another. I’ve setup a Master Keyword list on my clients site which works just fine however I would like it to only display keywords that had images assigned to them. The image repository that my client is creating is an ongoing project but they wanted to create the Master Keyword list at the beginning so others who were populating this repository didn’t have to. So is it possible to only display keywords within the Master Keyword list that have images assigned to them? I’ve looked through the Admin Guide and the only relevant ref I can see is the one I’m currently using to display all master keywords ‘CatalogSet.getMasterKeywords()’.




There is no “CatalogSet.getMasterKeywords()”. It’s a typo in the NP API section of the manual, one of many that’s been (re-)reported in every version of the manual since launch (v7)! Despite being given a detailed correction list the manual’s author has persistently refusing to correct the NP API’s many typos, for reasons I can’t fathom. Not fixing it leads to problems like you’ve hit. Also note that the record object (case-sensitive) is ‘record’ with a lowercase ‘r’ and not Record as shown in the manual.

I believe from testing I did early on in NP’s life that “CatalogSet.getMasterKeywords()” should really be “CatalogSet.getMasterKeywordsAll()”. In fact you probably want it at Catalog object scope, though few users deploy sites pulling data from multiple catalogues - which is what CatalogSet is for.

Whatever, it won’t solve your problem as getMasterKeywordsAll() simply loads in the Master Keyword List (MKL) you see in the Portfolio client for that catalogue. Portfolio can’t tell you which MKL values are used and which aren’t. You’ll need to figure that out by some other means and store (only) the MKL’s used words as the predefined list (PDL) for a custom field. now you load the PDL instead of the MKL but target searches from that list to the Keywords field.

You get a PDL like this, assuming field "Used Keywords"has a PDL:

Not too intuitive, but I hope that helps. BTW, do report the bugs in the manual as perhaps its a popularity thing - typos only get fixed if more than N people complain.



I looked at all of the recent versions of the Portfolio NetPublish documentation and Mark is mostly correct; the Catalog.getMasterKeywordsAll() name is correct in the 9, 9.5, and 10.1 manuals but wrong in the 10, 10.2, and 11 manuals; I’ll (re-)submit the documentation error again. The online help in Portfolio Server 11 correct—I’ll look at the others when I get a chance.

As for the record/Record issue, Mark is technically incorrect; all of our documentation and code uses “RecordSet.record” because “record” is property of the RecordSet object that points to the current Record object when iterating through a RecordSet; you can also receive Record objects from Collection.getRecord().



I realized that I got the name of the object wrong; Mark was referring to CatalogSet, not Catalog.

That is incorrect in both the online documentation and the printed docs for Portfolio 11, and in all of the PDFs going back to Portfolio 9. This probably explains why it’s been hard to squish, as there are two similar command names.

I’ve passed this on.


FWIW, the API errors have been there since v7.0, the release version. A detailed correction has been submitted for each version since (c 10 years!). For some reason, the document ‘owner’ refuses to make the changes. I’d suggest someone else be assigned the update task or it will never get fixed. Can’t see the ROI in deliberately publishing false info!