Share this page

# hasField

Checks if a given field is present.

`public boolean hasField(LrISOField fldno) throws LrISOException`

`public boolean hasField(int fldno) throws LrISOException`

## Parameters

- fldno: The ISOField number.

## Return values

This function returns true if the field exists, and false if the field does not exist.

## Example

Copy code

    LrISOMsg m = new LrISOMsg();
    m.set(ISO87Fields.PAN_PRIMARY_ACCOUNT_NUMBER, "1234567891234567890");
    if (m.hasField(ISO87Fields.PAN_PRIMARY_ACCOUNT_NUMBER))
            lr.output_message("The Primary Account Number filed is present in the message");
    else
            lr.output_message("The Primary Account Number filed is NOT present in the message");

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: