Remove

Syntax 1: for JSONPackage

Description

Removes a key. If more than one key with the same name exists, then remove the first key. Notice that the IgnoreCase property (true by default) determines whether the key name will be matched in a case-sensitive manner.

Applies to

JSONPackage

Syntax

objectname.remove ( Key )

Argument

Description

objectname

Name of the JSONPackage object.

Key

A string specifying the key.


Return value

Integer. Returns 1 if it succeeds and -1 if an error occurs. If any argument's value is null, the method returns null.

Examples

This example removes the "d_employess" key:

boolean lb_exist
datastore lds_employee
datawindowchild ldwc_active
JsonPackage lnv_package

lnv_package = create JsonPackage

...//Initialize data for lds_employee, ldwc_active

// Package the data
lnv_package.SetValue("d_department", dw_department, false)
lnv_package.SetValue("d_employee", lds_employee) 
lnv_package.SetValue("dddw_active", ldwc_active, false)
…
 lnv_package.Remove("d_employee")
 // lb_exist will return false
 lb_exist = lnv_package.ContainsKey("d_employee")

See also

KeyCount

GetKey

ContainsKey

Syntax 2: for PDFFormFieldRadioButtonGroup

Description

Removes a radio button object from a PDFFormFieldRadioButtonGroup object.

Applies to

PDFFormFieldRadioButtonGroup object

Syntax

long Remove (long index)
long Remove (PDFFormFieldRadioButton radioButton)

Argument

Description

index

The index of the PDFFormFieldRadioButton object.

radioButton

The name of the PDFFormFieldRadioButton object.


Return value

Long. Returns 1 if it succeeds. If an error occurs, returns the Error Codes. Otherwise, returns null.

Examples

This example removes the PDFFormFieldRadioButton object with the index 1 in lpdf_rbgroup.

Long ll_return 
ll_return = lpdf_rbgroup.remove(1)

This example removes the PDFFormFieldRadioButton object with the name "lpdf_radiobutton" in lpdf_rbgroup.

ll_return = lpdf_rbgroup.remove(lpdf_radiobutton)

See also

Add

Clone

GetAt

GetCount

RemoveAll