Labels

accessibility (2) ADF (1) archiver (3) cmu (1) contributor (13) cookie (1) DAM (3) date (3) download (3) dynamic list (4) ephox (5) fatwire (1) fck (1) filters (1) folders (4) headers (2) IBR (3) ImageAlchemy (3) java (4) javascript (2) layout/template (4) link (6) locale (2) multilingual (1) rendition (3) replicator (4) rules (1) schema (1) search (11) sites (1) sitestudio (24) ssp/sspu (5) SSUrlFieldName (2) stellent (4) timezone (1) urm (1) weblogic (1) workflow (2)

Thursday 3 March 2011

Empty a metadata field at revision checkin

An issue that dogged me for ages was that metadata fields can't be reset to empty for a revision checkin if they already have something in them. For example, if a content item at revision one has some comments then the checkin form for revision two will display the same comments. There's no way to clear the field for the user. Even if they delete the comments and then submit, the comments reappear! The only way to get rid of them is to type something else. But there is a better way.
I got a tip from Jakub that the side effects of a rule could do it. Set the Rule's activation condition to fire only "On Request" when "Check In Selected" (this means you won't destroy newly-entered comments.) Then go to the Side Effects tab and add the metadata field as a Key, set the Value as empty.

Eureka! It works! Except...

SiteStudio Designer doesn't fire the rules properly so you'll need to enter a custom script to catch revisions of fragments. Add or IdcService like "ASSIGN_DOCINFO_FORM" to catch fragments.

You beaut, it works! Except...

SiteStudio designer doesn't prompt for metadata on things like Templates. If you want to reset metadata here you'll need to catch the IdcService CHECKIN_UNIVERSAL (without mucking with any other components that use it.)

Crikey, it's a bit of nailing down but... it works!

No comments:

Post a Comment