# How can I use my own row struct to create my own datatable?

**URL:** <https://forums.unrealengine.com/t/how-can-i-use-my-own-row-struct-to-create-my-own-datatable/375254>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [November 3, 2016, 3:28am UTC](https://forums.unrealengine.com/t/how-can-i-use-my-own-row-struct-to-create-my-own-datatable/375254 "2016-11-03T03:28:17Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Atheist91](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Atheist91](https://forums.unrealengine.com/u/Atheist91)\
**Post date:** [November 10, 2016, 12:42pm UTC](https://forums.unrealengine.com/t/how-can-i-use-my-own-row-struct-to-create-my-own-datatable/375254/6 "2016-11-10T12:42:28Z")

</div>

Did you read this?

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

* * *

**Edit:**

Here’s the creation of the datatable using custom struct.

Although, I’m using a C++ struct here, this method will work for **blueprint structs** as well.

```
USTRUCT(Blueprintable)
struct FExampleDatatableRow : public FTableRowBase
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FString SomeVar;
};

```

[http://i.imgur.com/rMNwYzK.png/](http://i.imgur.com/rMNwYzK.png/)

[http://i.imgur.com/3Zj5MWH.png](http://i.imgur.com/3Zj5MWH.png)

And to get data from such data table in C++:

```
UDataTable* DataTable; // populate it however you want
const FName RowName = FName("SomeRow");
FExampleDatatableRow* FoundRow = DataTable->FindRow<FExampleDatatableRow>(RowName, "");
```

---

_[View the full topic](https://forums.unrealengine.com/t/how-can-i-use-my-own-row-struct-to-create-my-own-datatable/375254)._
