---
sourceDocument: Australia API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/api-reference

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# GlideElementDynamicAttributeStore - Global

# GlideElementDynamicAttributeStore - Global {#ariaid-title1}

Release version: Australia  
Updated March 12, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 7 minutes to read  
The GlideElementDynamicAttributeStore API provides convenient script methods for managing dynamic attributes in the current glide record. Use these methods in conjunction with the
GlideRecord API to get and set defined dynamic attribute values.

To use this API to create dynamic attributes you must have the dynamic_schema_writer role. To read dynamic data using this API you must have the dynamic_schema_reader role.

This API extends the [GlideElement - Global](https://servicenow-prod.fluidtopics.net/o_Lv25nSEwsDQ_Ej4p8L5Q#c_GlideElementAPI "The GlideElement API provides a number of convenient script methods for dealing with fields and their values. GlideElement methods are available for the fields of the current glide record.") API.

See also [Dynamic Schema](https://www.servicenow.com/docs/access?context=dynamic-schema&version=australia&pubname=australia-platform-administration&ft:locale=en-US).  
See also:

* [GlideDynamicAttribute - Global](https://servicenow-prod.fluidtopics.net/qkURqhb1AentmdQLTt_bMw#GlideDynamicAttributeAPI "The GlideDynamicAttribute API provides access to dynamic attribute metadata.")
* [GlideDynamicNamespace - Global](https://servicenow-prod.fluidtopics.net/gcpCaMBidDHif~qHQ78buA#GlideDynamicNamespaceAPI "The GlideDynamicNamespace API provides access to dynamic namespace metadata.")
* [GlideDynamicAttributeStore - Global](https://servicenow-prod.fluidtopics.net/LIzpeO8Zm4gqCjkhgpdcbw#GlideDynamicAttStoreAPI "Use the GlideDynamicAttributeStore API to create objects for working with dynamic attributes independently of a table or field.")
{#GlideElementDynamicAttStoreAPI__ul_dvm_lym_b2c}

## GlideElementDynamicAttributeStore - getDynamicAttributeDisplayValue(String attributePath) {#ariaid-title2}

Returns the display value of the dynamic attribute located at a specified attribute path within a dynamic attribute store. If a display value is not available, it returns the internal value.
{#GEDAS-getDynamicAttributeDisplayValue_S__table_zn3_1md_bbc__entry__3}

| Name | Type | Description |
|-|-|-|
| attributePath | String | Attribute path to use to locate the associated dynamic schema attribute. Format: `"attr_name"` `attr_name`: Name of the dynamic attribute. Table: In the attribute field of the Dynamic Attribute \[dynamic_attribute\] table. |
[Table 1. Parameters]

{#GEDAS-getDynamicAttributeDisplayValue_S__table_zn3_1md_bbc} {#GEDAS-getDynamicAttributeDisplayValue_S__table_a43_1md_bbc__entry__2}

| Type | Description |
|-|-|
| Object | Value for the associated dynamic attribute in human-readable format. If the attributePath parameter contains invalid information, returns a null. |
[Table 2. Returns]

{#GEDAS-getDynamicAttributeDisplayValue_S__table_a43_1md_bbc}  
The following code example shows how to call this method.

    //Gets all the display values of the luxury attribute from the inc_dynamic_schema dynamic attribute store column on the incident table
    var gr_Inc = new GlideRecord('incident');
    gr_Inc.query();
    while(gr_Inc.next()) {
        var attr = gr_Inc.getDynamicAttributeDisplayValue('inc_dynamic_schema->luxury');
        gs.info(attr);
    }

    //You can also use if(gr.next()) if you don't want all the values
    var gr_Inc = new GlideRecord('incident');
    gr_Inc.query();

    if(gr_Inc.next()) {
        var attr = gr_Inc.getDynamicAttributeDisplayValue('inc_dynamic_schema->luxury');
        gs.info(attr);
    }

## GlideElementDynamicAttributeStore - getDynamicAttributePathsInSchema() {#ariaid-title3}

Returns the set of dynamic attribute paths that are present in the schema configured for the store.
{#GEDAS-getDynamicAttributePathsInSchema__table_zqg_l1n_m3c__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 3. Parameters]

{#GEDAS-getDynamicAttributePathsInSchema__table_zqg_l1n_m3c} {#GEDAS-getDynamicAttributePathsInSchema__table_arg_l1n_m3c__entry__2}

| Type | Description |
|-|-|
| Array | Array of attribute paths as strings. |
[Table 4. Returns]

{#GEDAS-getDynamicAttributePathsInSchema__table_arg_l1n_m3c}  
The following example shows how to return the dynamic attribute paths that are present in the schema and configured for the store.

    var gr_Inc = new GlideRecord('incident');
    gr_Inc.get('number', 'INC0009009');
    gs.info(gr_Inc.inc_dynamic_schema.getDynamicAttributePathsInSchema());

Output:

    number,short_description,active

## GlideElementDynamicAttributeStore - getDynamicAttributePathsInStore() {#ariaid-title4}

Returns the set of dynamic attribute paths that are present in the store.
{#GEDAS-getDynamicAttributePathsInStore__table_gzs_jld_bbc__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 5. Parameters]

{#GEDAS-getDynamicAttributePathsInStore__table_gzs_jld_bbc} {#GEDAS-getDynamicAttributePathsInStore__table_hzs_jld_bbc__entry__2}

| Type | Description |
|-|-|
| Array | Array of attribute paths as strings. |
[Table 6. Returns]

{#GEDAS-getDynamicAttributePathsInStore__table_hzs_jld_bbc}  
The following example shows how to return the dynamic attribute paths that are present in the store.

    var gr_Inc = new GlideRecord('incident');
    gr_Inc.get('number', 'INC0009009');
    gs.info(gr_Inc.inc_dynamic_schema.getDynamicAttributePathsInStore());

Output:

    severity,number,opened_at,short_description,urgency,opened_by,impact,active,description,state,priority

## GlideElementDynamicAttributeStore - getDynamicAttributesInStore() {#ariaid-title5}

Returns the set of dynamic attribute definitions that are present and stored in a field.
{#GEDAS-getDynamicAttributesInStore__table_gzs_jld_bbc__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 7. Parameters]

{#GEDAS-getDynamicAttributesInStore__table_gzs_jld_bbc} {#GEDAS-getDynamicAttributesInStore__table_hzs_jld_bbc__entry__2}

| Type | Description |
|-|-|
| Array | Array of [GlideDynamicAttribute](https://servicenow-prod.fluidtopics.net/qkURqhb1AentmdQLTt_bMw#GlideDynamicAttributeAPI "The GlideDynamicAttribute API provides access to dynamic attribute metadata.") objects. |
[Table 8. Returns]

{#GEDAS-getDynamicAttributesInStore__table_hzs_jld_bbc}  
The following example shows how to retrieve the contents of a stored dynamic attribute, list the attributes it stored, and the attributes in its schema.

    var record = new GlideRecord('cool_thing');
    record.get('number', 'COOL0000005');

    gs.info("Store Contents:\n" + JSON.stringify(JSON.parse(record.store1), null, 2) + "\n");
    gs.info("Attributes in Store:\n" + record.store1.getDynamicAttributesInStore() + "\n");
    gs.info("Attributes in Schema:\n" + record.store1.getDynamicAttributesInSchema() + "\n");

Output:

    *** Script: Store Contents:
    {
      {
        "b": "hello world"
      },
      {
        "integer1": "5"
      },
      {
        "integer1": "10",
        "string1": "hello"
      }
    }

    *** Script: Attributes in Store: b,integer1,integer1,string1

    *** Script: Attributes in Schema:
    integer1,string1,integer1

## GlideElementDynamicAttributeStore - getDynamicAttributesInSchema() {#ariaid-title6}

Returns the set of dynamic attribute definitions that are pointed to in the schema.
{#GEDAS-getDynamicAttributesInSchema__table_gzs_jld_bbc__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 9. Parameters]

{#GEDAS-getDynamicAttributesInSchema__table_gzs_jld_bbc} {#GEDAS-getDynamicAttributesInSchema__table_hzs_jld_bbc__entry__2}

| Type | Description |
|-|-|
| Array | Array of [GlideDynamicAttribute](https://servicenow-prod.fluidtopics.net/qkURqhb1AentmdQLTt_bMw#GlideDynamicAttributeAPI "The GlideDynamicAttribute API provides access to dynamic attribute metadata.") objects. |
[Table 10. Returns]

{#GEDAS-getDynamicAttributesInSchema__table_hzs_jld_bbc}  
The following example shows how to retrieve the contents of a stored dynamic attribute, list the attributes it stored, and the attributes in its schema.

    var record = new GlideRecord('cool_thing');
    record.get('number', 'COOL0000005');

    gs.info("Store Contents:\n" + JSON.stringify(JSON.parse(record.store1), null, 2) + "\n");
    gs.info("Attributes in Store:\n" + record.store1.getDynamicAttributesInStore() + "\n");
    gs.info("Attributes in Schema:\n" + record.store1.getDynamicAttributesInSchema() + "\n");

Output:

    *** Script: Store Contents:
    {
      {
        "b": "hello world"
      },
      {
        "integer1": "5"
      },
      {
        "integer1": "10",
        "string1": "hello"
      }
    }

    *** Script: Attributes in Store: b,integer1,integer1,string1

    *** Script: Attributes in Schema:
    integer1,string1,integer1

## GlideElementDynamicAttributeStore - getDynamicAttributeValue(String attributePath) {#ariaid-title7}

Returns the internal value of the dynamic attribute pointed to by a passed-in attribute path within a dynamic attribute store.
See also [Dynamic Schema](https://www.servicenow.com/docs/access?context=dynamic-schema&version=australia&pubname=australia-platform-administration&ft:locale=en-US).
{#GEDAS-getDynamicAttributeValue_S__table_tnp_rld_bbc__entry__3}

| Name | Type | Description |
|-|-|-|
| attributePath | String | Attribute path to use to locate the associated dynamic schema attribute. Format: `"attr_name"` `attr_name`: Name of the dynamic attribute. Table: In the attribute field of the Dynamic Attribute \[dynamic_attribute\] table. |
[Table 11. Parameters]

{#GEDAS-getDynamicAttributeValue_S__table_tnp_rld_bbc} {#GEDAS-getDynamicAttributeValue_S__table_unp_rld_bbc__entry__2}

| Type | Description |
|-|-|
| Object | Value of the dynamic attribute pointed to by the passed attribute path. If the attributePath parameter contains invalid information, returns a null. |
[Table 12. Returns]

{#GEDAS-getDynamicAttributeValue_S__table_unp_rld_bbc}  
The following code example shows how to call this method.

    var gr_Inc = new GlideRecord('incident');
    gr_Inc.query();

    while(gr_Inc.next()) {
        var attr = gr_Inc.getDynamicAttributeValue('inc_dynamic_schema->luxury');
        gs.info(attr);
    }

Output:


    *** Script: 1

## GlideElementDynamicAttributeStore - getDynamicNamespace() {#ariaid-title8}

Returns a dynamic namespace that is configured for the store.
{#GEDAS-getDynamicNamespace__table_gzs_jld_bbc__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 13. Parameters]

{#GEDAS-getDynamicNamespace__table_gzs_jld_bbc} {#GEDAS-getDynamicNamespace__table_hzs_jld_bbc__entry__2}

| Type | Description |
|-|-|
| IDynamicNamespace | Dynamic namespace object information. |
[Table 14. Returns]

{#GEDAS-getDynamicNamespace__table_hzs_jld_bbc}  
The following example shows how to return the dynamic namespace object configured for the store.

    var gr_Inc = new GlideRecord('incident');
    gr_Inc.query();
    if (gr_Inc.next()) {
        var namespace = gr_Inc.inc_dynamic_schema.getDynamicNamespace();
     
        gs.info("toString:    " + namespace);
        gs.info("name:        " + namespace.getName());
        gs.info("isActive:    " + namespace.isActive());
        gs.info("isTransient: " + namespace.isTransient());
    }

Output:

    toString:    incident/inc_dynamic_schema
    name:        incident/inc_dynamic_schema
    isActive:    true
    isTransient: false

## GlideElementDynamicAttributeStore - getDynamicNamespaceName() {#ariaid-title9}

Gets the name of the dynamic namespace that is configured for the store.
{#GEDAS-getDynamicNamespaceName__table_n5y_sln_b2c__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 15. Parameters]

{#GEDAS-getDynamicNamespaceName__table_n5y_sln_b2c} {#GEDAS-getDynamicNamespaceName__table_o5y_sln_b2c__entry__2}

| Type | Description |
|-|-|
| String | Name of the dynamic namespace. |
[Table 16. Returns]

{#GEDAS-getDynamicNamespaceName__table_o5y_sln_b2c}  
The following example shows how to return the name of the dynamic namespace configured for the store.

    var gr_Inc = new GlideRecord('incident');
    gr_Inc.query();
    if (gr_Inc.next()) {
        gs.info(gr_Inc.inc_dynamic_schema.getDynamicNamespaceName());
    }

Output:

    incident/inc_dynamic_schema

## GlideElementDynamicAttributeStore - setDynamicAttributeValue(String attributePath, Object value) {#ariaid-title10}

Sets the attribute pointed to by a specified attribute path in a dynamic attribute store to a specified value.
See also [Dynamic Schema](https://www.servicenow.com/docs/access?context=dynamic-schema&version=australia&pubname=australia-platform-administration&ft:locale=en-US).
{#GEDAS-setDynamicAttributeValue_S__table_aj2_vmd_bbc__entry__3}{#GEDAS-setDynamicAttributeValue_S__DynS-value-entry}

| Name | Type | Description |
|-|-|-|
| attributePath | String | Attribute path to use to locate the associated dynamic schema attribute. Format: `"attr_name"` `attr_name`: Name of the dynamic attribute. Table: In the attribute field of the Dynamic Attribute \[dynamic_attribute\] table. |
| value | Object | Value to set in the specified attribute. Note: For dynamic attributes, only the following data types are supported: * Boolean (True/False) * Decimal * Floating Point Number * GlideDate * GlideDateTime * Integer * String {#GEDAS-setDynamicAttributeValue_S__ul_dwc_vyy_1hc} |
[Table 17. Parameters]

{#GEDAS-setDynamicAttributeValue_S__table_aj2_vmd_bbc} {#GEDAS-setDynamicAttributeValue_S__table_bj2_vmd_bbc__entry__2}

| Type | Description |
|-|-|
| GlideElementDynamicAttributeStore | Returns a GlideElementDynamicAttributeStore object containing the specified value. If the attributePath parameter contains invalid information, the attribute is not updated. |
[Table 18. Returns]

{#GEDAS-setDynamicAttributeValue_S__table_bj2_vmd_bbc}  
The following code example shows how to call this method.

    //This simple example inserts a make attribute on the inc_dynamic_schema column where the value of the make attribute is Ford.
    var gr_Inc = new GlideRecord('incident');
    gr_Inc.setDynamicAttributeValue('inc_dynamic_schema->make', 'Ford');
    gr_Inc.insert();

## GlideElementDynamicAttributeStore - setDynamicAttributeValues(GlideDynamicAttributeStore values) {#ariaid-title11}

Sets the values specified in the passed GlideElementDynamicAttributeStore object in the dynamic attribute store of the current GlideRecord element. The current element's data type must be set to Dynamic Attribute Store.
See also [Dynamic Schema](https://www.servicenow.com/docs/access?context=dynamic-schema&version=australia&pubname=australia-platform-administration&ft:locale=en-US).
{#GEDAS-setDynamicAttributeValues_O__table_ojl_snd_bbc__entry__3}

| Name | Type | Description |
|-|-|-|
| values | [GlideDynamicAttributeStore](https://servicenow-prod.fluidtopics.net/LIzpeO8Zm4gqCjkhgpdcbw#GlideDynamicAttStoreAPI "Use the GlideDynamicAttributeStore API to create objects for working with dynamic attributes independently of a table or field.") | Object that contains the values to set in the current element's dynamic schema. Values not specified in this object are not updated. |
[Table 19. Parameters]

{#GEDAS-setDynamicAttributeValues_O__table_ojl_snd_bbc} {#GEDAS-setDynamicAttributeValues_O__table_pjl_snd_bbc__entry__2}

| Type | Description |
|-|-|
| GlideElementDynamicAttributeStore | Updated GlideElementDynamicAttributeStore object. |
[Table 20. Returns]

{#GEDAS-setDynamicAttributeValues_O__table_pjl_snd_bbc}  
The following code example shows how to call this method.

    var gr_Inc = new GlideRecord('incident');
    var das = new GlideDynamicAttributeStore();
    das.setDynamicAttributeValue("color", "black");
    das.setDynamicAttributeValue("make","Honda");
    das.setDynamicAttributeValue("model","CRV");
    gr_Inc.setDynamicAttributeValues('inc_dynamic_schema', das);
    gr_Inc.insert();

This code example inserts the following in the u_inc_dynamic_schema column:

    {
      "color" : "black",
      "make" : "Honda",
      "model" : "CRV"
    }

## GlideElementDynamicAttributeStore - setDynamicAttributeDisplayValue(String attributePath) {#ariaid-title12}

Sets the display value of the dynamic attribute located at a specified path within the dynamic attribute store of the current GlideRecord element.
{#GEDAS-setDynAttributeDisplayValue_S__table_bfg_2nd_bbc__entry__3}

| Name | Type | Description |
|-|-|-|
| attributePath | String | Attribute path to use to locate the associated dynamic schema attribute. Format: `"attr_name"` `attr_name`: Name of the dynamic attribute. Table: In the attribute field of the Dynamic Attribute \[dynamic_attribute\] table. |
| value | Object | Value to set in the current dynamic attribute element. The passed value must be of one of the following data types: * Boolean (True/False) * Decimal * Floating Point Number * GlideDate * GlideDateTime * Integer * String {#GEDAS-setDynAttributeDisplayValue_S__DynS-valid_data_types-ul} |
[Table 21. Parameters]

{#GEDAS-setDynAttributeDisplayValue_S__table_bfg_2nd_bbc} {#GEDAS-setDynAttributeDisplayValue_S__table_cfg_2nd_bbc__entry__2}

| Type | Description |
|-|-|
| GlideElementDynamicAttributeStore | Object that contains the updated glide element. |
[Table 22. Returns]

{#GEDAS-setDynAttributeDisplayValue_S__table_cfg_2nd_bbc}  
The following code example shows how to call this method.

    var grFleet = new GlideRecord('u_car_fleet');
    grFleet.setDynamicAttributeValue('u_dyn_attr_store', 'color', 'Yellow');
    grFleet.setDynamicAttributeValue('u_dyn_attr_store', 'make', 'Ford');
    var sysId = grFleet.insert();
    gs.info("Inserted: " + grFleet.u_dyn_attr_store);

    var daStore = new GlideDynamicAttributeStore();
    daStore.setDynamicAttributeValue('color', 'Green');
    daStore.setDynamicAttributeValue('model', 'Bronco');

    var geDynAttrStore = grFleet.getElement('u_dyn_attr_store');
    geDynAttrStore.setDynamicAttributeDisplayValues(daStore);
    grFleet.update();
    gs.info("Updated:  " + grFleet.u_dyn_attr_store);

Output:

    *** Script: Inserted: {"color":"Yellow","make":"Ford"}
    *** Script: Updated:  {"color":"Green","make":"Ford","model":"Bronco"}

The following code example shows how a Boolean display value is stored as "1" but is passed back as "true".

     var gr_Inc = new GlideRecord('incident');
    gr_Inc.setDynamicAttributeDisplayValue('u_inc_dynamic_schema->u_luxury', '1');
    gr_Inc.insert()

Returned value:

    {
      "u_luxury" : "true"
    }

## GlideElementDynamicAttributeStore - setDynamicAttributeDisplayValues(GlideDynamicAttributeStore values) {#ariaid-title13}

Sets the display values specified in the passed GlideDynamicAttributeStore object in the dynamic attributes of the current GlideRecord element. The current element's data type must be set to Dynamic Attribute Store in the associated table.
{#GEDAS-setDynAttributeDisplayValues_O__table_o32_b4d_bbc__entry__3}

| Name | Type | Description |
|-|-|-|
| values | [GlideDynamicAttributeStore](https://servicenow-prod.fluidtopics.net/LIzpeO8Zm4gqCjkhgpdcbw#GlideDynamicAttStoreAPI "Use the GlideDynamicAttributeStore API to create objects for working with dynamic attributes independently of a table or field.") | Object that contains the display values to set in the current element's dynamic attribute store. Display values not specified in this object are not updated. This object must contain both the attribute path and the display value for each attribute to store. For example: { "color":"Blue", "make":"Ford", "model":"Mustang" } |
[Table 23. Parameters]

{#GEDAS-setDynAttributeDisplayValues_O__table_o32_b4d_bbc} {#GEDAS-setDynAttributeDisplayValues_O__table_p32_b4d_bbc__entry__2}

| Type | Description |
|-|-|
| GlideElementDynamicAttributeStore | Object that contains the updated glide element. |
[Table 24. Returns]

{#GEDAS-setDynAttributeDisplayValues_O__table_p32_b4d_bbc}  
The following code example shows how to call this method.

    var daStore = new GlideDynamicAttributeStore();
    daStore.setDynamicAttributeValue('make', 'Ford');
    daStore.setDynamicAttributeValue('model', 'Mustang');
    daStore.setDynamicAttributeValue('color', 'Blue');
    gs.info("daStore: " + daStore);

    var gr_Car = new GlideRecord('u_car_fleet');
    gr_Car.query();
    while(gr_Car.next()) {
      var glideElement = gr_Car.getElement('u_dyn_attr_store');
      glideElement.setDynamicAttributeValues(daStore);
      gr_Car.update();
    }

Output:

    daStore: {"color":"Blue","model":"Mustang","make":"Ford"}


