Symptom
If free text metadata needs to be populated with certain values, you can save time on re-entering it by having the last N values cached and made readily available as buttons underneath the text box. This allows you to simply select a button in order to add that text in one move:
Resolution
In order to achieve this, database alterations are required. Please consult your local DB administrator or contact IPV Support if you are unsure of any of the below.
In essence, ui_schema in the necessary rows of the CuratorDB Metadataviews table has to be set with the text field type of "textarea" and with the "numberCached" set to a value that is greater than 0. The difficulty here, however, is that the setting is in the ui_schema column for which there is not a GUI editor yet (writing at the time of Curator 3.5 release).
For example, if you want to cache free entry text on a metadata "Holiday Snaps", you will need to find the metadataviewcolumns row that sets that metadata into the view you are using in the Logger, assuming you are using the 'MultiLoggerSubClipView' there:
SELECT * FROM curatordb.metadataviewcolumns WHERE
name_id = (Select name_id FROM curatordb.metadatanames where name like 'HolidaySnaps') AND
view_id = (select view_id FROM curatordb.metadataviews where name like 'MultiLoggerSubClipView');
Examine the ui_schema entry for the selected row. You will need to add the required settings.
An example minimum ui_schema is shown below:
{"type":"textarea","numberCached":5,"allowCacheDuplicates":false}
A good number of cached values (numberCached) to set here is 5 (as demonstrated in the screenshot at the top of this article): if you require a different number of cached values, it is useful to keep in mind that this number should ideally be set to 3*N - 1 in order to neatly fill up the rows with buttons. Setting this number (in the above example, 5) will fill up to two rows of the buttons as there is always a Clear button displayed which allows you to remove the already set cached values, and three buttons will be placed per row underneath the text box.
Saving a higher number of clips with different strings in the text field than the number you have specified for numberCached will result in the oldest added value being discarded and a new button for the newest created value added at the end. For example, if 5 cached values have been set for numberCached and then a sixth cached value is added, the first cached value button will be removed, button values shifted to the front and a new one created in the last position, and so on.
The allowCacheDuplicates controls whether each button will contain unique text - this should usually be set to false. If this is set to true,a new button will be created when the same text is entered again.
Related
For information on keeping buttons selected when creating subsequent clipmarks, please refer to the following article: Setting metadata to be persistent in Curator Logger