# Dynamically changing Data Table Row Name

**URL:** <https://forums.unrealengine.com/t/dynamically-changing-data-table-row-name/1743051>\
**Category:** C++\
**Tags:** data-table, unreal-engine, CPP, question\
**Created:** [March 10, 2024, 1:46pm UTC](https://forums.unrealengine.com/t/dynamically-changing-data-table-row-name/1743051 "2024-03-10T13:46:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ManiacMuchin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ManiacMuchin](https://forums.unrealengine.com/u/ManiacMuchin)\
**Post date:** [March 10, 2024, 1:46pm UTC](https://forums.unrealengine.com/t/dynamically-changing-data-table-row-name/1743051/1 "2024-03-10T13:46:02Z")

</div>

Hello!

I want to somehow dynamically change the Row Name of each entry in a Data Table to be the same name of the “item” I create. Is there a way to make that happen?

My struct has another struct of “FItemTextData” which contains the item name. Now in the Data Table I have created I just want the “Row Name” to be changed to the “ItemName”. There has to be a way to do this, I’ve been googling for days and I can’t find a solution. Thank you!

```auto
USTRUCT()
struct FItemTextData
{
    GENERATED_BODY()

    UPROPERTY(EditAnywhere)
    FName ItemName;

    UPROPERTY(EditAnywhere)
    FText Description;

    UPROPERTY(EditAnywhere)
    FText InteractionText;

    UPROPERTY(EditAnywhere)
    FText UsageText;
};

USTRUCT()
struct FItemData : public FTableRowBase
{
    GENERATED_USTRUCT_BODY()

    UPROPERTY(EditAnywhere)
    EItemRarity ItemRarity;

    UPROPERTY(EditAnywhere)
    FItemTextData ItemTextData;

    UPROPERTY(EditAnywhere)
    FItemStatsData ItemStatsData;

    UPROPERTY(EditAnywhere)
    FItemInfoData ItemInfoData;
};

```

---

<div class="post-metadata">

**Author:** ![fongcrush](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fongcrush](https://forums.unrealengine.com/u/fongcrush)\
**Post date:** [February 8, 2025, 4:18am UTC](https://forums.unrealengine.com/t/dynamically-changing-data-table-row-name/1743051/2 "2025-02-08T04:18:29Z")

</div>

It’s been a long time, but I had the same problem, and figured it out

```auto
virtual void OnDataTableChanged(const UDataTable* InDataTable, const FName InRowName) override
{
	FDataTableEditorUtils::RenameRow(const_cast<UDataTable*>(InDataTable), InRowName, ItemName);
}

```

You have to add module on your project.Build.cs

```auto
if (Target.bBuildEditor)
{
	PrivateDependencyModuleNames.Add("UnrealEd");
}

```

UnrealEd is an editor-only, so it must be added conditionally
