How to change separator for Multivalued fields
By default TermWeb is using comma ,
as separator for storing values in database for Multivalued fields. Because of that users won’t be able to use comma in values for Multivalued fields.
In case when this value is not applicable for you needs you can change it by configuring TermWeb.
Instructions
For new installation
You need to configure only one property and start TermWeb.
Edit file termweb.properties in termweb home folder and add or edit property
multivalued.separator
For example:multivalued.separator=;
Start TermWeb.
For existing installation
To update separator for existing installation you need first pick new separator, update old values by replacing values containing new separator with some replacement.
Stop TermWeb.
Backup database before update.
Replace old values containing new separator with something else, for example new separator is
;
and replacement will be.
:UPDATE tw_value v SET v.value_unicode = REPLACE(v.value_unicode, ';', '.'), v.value_normalized = REPLACE(v.value_normalized, ';', '.') WHERE v.field_oid IN (SELECT f.oid FROM `tw_field` f WHERE f.cat_id = 'GMULTIVAL'); UPDATE tw_picklistitem li SET li.name = REPLACE(li.name, ';', '.') WHERE li.field_oid IN (SELECT f.oid FROM `tw_field` f WHERE f.cat_id = 'GMULTIVAL');
Â
Replace old separator
,
with new;
:UPDATE tw_value v SET v.value_unicode = REPLACE(v.value_unicode, ',', ';'), v.value_normalized = REPLACE(v.value_normalized, ',', ';') WHERE v.field_oid IN (SELECT f.oid FROM `tw_field` f WHERE f.cat_id = 'GMULTIVAL');
Â
Edit file termweb.properties in termweb home folder and add or edit property
multivalued.separator
multivalued.separator=;
Start TermWeb and test results
Â