SetComponentValue - HL7 Module - English - Foundation 22.1 - OnBase - Essential - Premier - Standard - external - Essential - Standard - Premier

HL7 Module

Platform
OnBase
Product
HL7 Module
Release
Foundation 22.1
License
Essential
Standard
Premier

This method is used to set the value of a specific component to a different value.

blnSetComponent = objHL7Field.SetComponentValue(1, "New Component Value")

Parameter

Type

Description

Component #

Integer

0 to (max-1), where max is from GetNumComponents.

Value string

String

Replacement value for this component.

Return Value

Description

0

Returned if the value could not be changed. For example, perhaps the input integer is less than 0 or greater than the number of components in the field.

If the number of components in the field is 0, then it is a special case, and SetValue will be used.

1

Returned if the input integer is within the range of components in the field (between 0 and the max number of components). If the original value and the new value exactly match (meaning the data did not change), then the return value will still be 1.