How to use nhModifyElements command to reset a character string attribute value back to default NULL.

Document ID : KB000050362
Last Modified Date : 14/02/2018
Show Technical Document Details


Issue: When using nhModifyElements command to reset element character string typed attribute value to default NULL, the command line wouldn't work as expected.

Fact: eHealth 6.2
Fact: eHealth 6.1


Command line tool nhModifyElements can change selected attributes for one or more elements maintained by eHealth. However, when a user tries to reset a character string typed attribute back to default NULL value, the command line ends up with error as per following example:

nhListElements -inGroup 61vm | nhModifyElements -fieldName pollingRegion -value ''
Error: Bad value specified on line 1.
nhListElements -inGroup 61vm | nhModifyElements -fieldName pollingRegion -value""
Error: A value is required.


As an empty/NULL value specified by double quotes or single quotes is not accepted by piped command line, user must use the -inFile to specify the name of the file that contains the list of modifications, and also specify unique values - a space symbol which will be treated as a NULL value by Oracle in this case, for each element:

(Note: ___ represents a space character (ASCII code 32))

There is a sampleInFile.txt contains the format which works:


After issuing command:

nhModifyElements -fieldName pollingRegion -inFile sampleInFile.txt

The command finishes with no prompting messages, and there is no error.

We could verify with SQLPlus:

# $NH_HOME/bin/sys/nhisql "SELECT name from nh_element where name like 'lodibm11b-1691-SH%' and POLLING_REGION IS NULL;"

Problem Environment:

Additional Information:

Please refer to As per CA eHealth Data Integration Guide (Chapter two) for how to utilize nhListElements and other tools to export element configuration information.

File Attachments: