---
schema_version: "1"
id: 4911fa13d1c5252ac3f79b7e752a55ca224cbd0f9baba999f69401a8692b181b
title: BucketFieldValue Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_reports_BucketFieldValue.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_BucketFieldValue.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 91ea386c25b92c21fa3ff79cde3da6f3228b80d6dc45d44a2b2aed62eda38f59
description: Contains information about the report values included in a bucket field.Creates an instance of the Reports.BucketFieldValue class using the specified parameters.Creates an instance of the Reports.BucketFieldValue class. You can then set values by using the class’s set methods.Returns the user-facing name of the bucket category.Returns the greatest range limit under which values are included in this bucket category (in buckets of type NUMBER).Returns a list of the values from the source field included in this bucket category (in buckets of type PICKLIST and buckets of type TEXT).Set the user-facing name of the bucket category.Sets the greatest limit of a range under which values are included in this bucket category (in buckets of type NUMBER).Specifies the values from the source field included in this bucket category (in buckets of type PICKLIST and buckets of type TEXT).Returns a string.
---
# BucketFieldValue Class

Contains information about the report values included in a bucket field.

## Namespace

[Reports](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_Reports.htm "The Reports namespace provides classes for accessing the same data as is available in the Salesforce Reports and Dashboards REST API.")

- **[BucketFieldValue Constructors](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_BucketFieldValue.htm#apex_reports_BucketFieldValue_constructors)**
- **[BucketFieldValue Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_BucketFieldValue.htm#apex_reports_BucketFieldValue_methods)**

## BucketFieldValue Constructors

The following are constructors for BucketFieldValue.

- **[BucketFieldValue(label, sourceDimensionValues, rangeUpperBound)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_BucketFieldValue.htm#apex_reports_BucketFieldValue_ctor)**  
    Creates an instance of the Reports.BucketFieldValue class using the specified parameters.
- **[BucketFieldValue()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_BucketFieldValue.htm#apex_reports_BucketFieldValue_ctor_2)**  
    Creates an instance of the Reports.BucketFieldValue class. You can then set values by using the class’s set methods.

### BucketFieldValue(label, sourceDimensionValues, rangeUpperBound)

Creates an instance of the Reports.BucketFieldValue class using the specified parameters.

#### Signature

public BucketFieldValue(String label, List<String\> sourceDimensionValues, Double rangeUpperBound)

#### Parameters

- **label**:
    
    Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")
    
    The user-facing name of the bucket.
- **sourceDimensionValues**:
    
    Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<[String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")\>
    
    A list of the values from the source field included in this bucket category (in buckets of type PICKLIST and buckets of type TEXT).
- **rangeUpperBound**:
    
    Type: [Double](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_double.htm#apex_methods_system_double "Contains methods for the Double primitive data type.")
    
    The greatest range limit under which values are included in this bucket category (in buckets of type NUMBER).

### BucketFieldValue()

Creates an instance of the Reports.BucketFieldValue class. You can then set values by using the class’s set methods.

#### Signature

public BucketFieldValue()

## BucketFieldValue Methods

The following are methods for BucketFieldValue.

- **[getLabel()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_BucketFieldValue.htm#apex_reports_BucketFieldValue_getLabel)**  
    Returns the user-facing name of the bucket category.
- **[getRangeUpperBound()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_BucketFieldValue.htm#apex_reports_BucketFieldValue_getRangeUpperBound)**  
    Returns the greatest range limit under which values are included in this bucket category (in buckets of type NUMBER).
- **[getSourceDimensionValues()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_BucketFieldValue.htm#apex_reports_BucketFieldValue_getSourceDimensionValues)**  
    Returns a list of the values from the source field included in this bucket category (in buckets of type PICKLIST and buckets of type TEXT).
- **[setLabel(label)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_BucketFieldValue.htm#apex_reports_BucketFieldValue_setLabel)**  
    Set the user-facing name of the bucket category.
- **[setRangeUpperBound(rangeUpperBound)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_BucketFieldValue.htm#apex_reports_BucketFieldValue_setRangeUpperBound)**  
    Sets the greatest limit of a range under which values are included in this bucket category (in buckets of type NUMBER).
- **[setSourceDimensionValues(sourceDimensionValues)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_BucketFieldValue.htm#apex_reports_BucketFieldValue_setSourceDimensionValues)**  
    Specifies the values from the source field included in this bucket category (in buckets of type PICKLIST and buckets of type TEXT).
- **[toString()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_BucketFieldValue.htm#apex_reports_BucketFieldValue_toString)**  
    Returns a string.

### getLabel()

Returns the user-facing name of the bucket category.

#### Signature

public String getLabel()

#### Return Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### getRangeUpperBound()

Returns the greatest range limit under which values are included in this bucket category (in buckets of type NUMBER).

#### Signature

public Double getRangeUpperBound()

#### Return Value

Type: [Double](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_double.htm#apex_methods_system_double "Contains methods for the Double primitive data type.")

### getSourceDimensionValues()

Returns a list of the values from the source field included in this bucket category (in buckets of type PICKLIST and buckets of type TEXT).

#### Signature

public List<String\> getSourceDimensionValues()

#### Return Value

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<[String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")\>

### setLabel(label)

Set the user-facing name of the bucket category.

#### Signature

public void setLabel(String label)

#### Parameters

- **label**:
    
    Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

#### Return Value

Type: void

### setRangeUpperBound(rangeUpperBound)

Sets the greatest limit of a range under which values are included in this bucket category (in buckets of type NUMBER).

#### Signature

public void setRangeUpperBound(Double rangeUpperBound)

#### Parameters

- **rangeUpperBound**:
    
    Type: [Double](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_double.htm#apex_methods_system_double "Contains methods for the Double primitive data type.")

#### Return Value

Type: void

### setSourceDimensionValues(sourceDimensionValues)

Specifies the values from the source field included in this bucket category (in buckets of type PICKLIST and buckets of type TEXT).

#### Signature

public void setSourceDimensionValues(List<String\> sourceDimensionValues)

#### Parameters

- **sourceDimensionValues**:
    
    Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<[String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")\>

#### Return Value

Type: void

### toString()

Returns a string.

#### Signature

public String toString()

#### Return Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")