# Data table with UObject member

**URL:** <https://forums.unrealengine.com/t/data-table-with-uobject-member/601790>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [July 10, 2022, 6:41pm UTC](https://forums.unrealengine.com/t/data-table-with-uobject-member/601790 "2022-07-10T18:41:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fanzypantz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fanzypantz](https://forums.unrealengine.com/u/fanzypantz)\
**Post date:** [July 10, 2022, 6:41pm UTC](https://forums.unrealengine.com/t/data-table-with-uobject-member/601790/1 "2022-07-10T18:41:40Z")

</div>

Is it possible to have an Abstract UObject as a member in a data table?

I’ve somewhat managed to cobble together an inventory system making use of UObjects as a data type to store the information, with on use functions and possibility of inheritance.

Due to some reason, I can’t send the UObject data array (inventory array) to the UI of clients properly, so I’ve created smaller struct array containing itemIDs and necessary info to pass with the UI refresh method. This I’d like to also create a master list with a simple itemID and object reference that can be fetched for the underlying logic.

I could maybe fix the replication issue, but from what I’ve read, UObjects don’t really replicate. So I’m just handling inventory transaction on the server, never replicating the inventory itself.

The current Struct looks like this:

```auto
USTRUCT(Blueprintable)
struct FMasterListItem : public FTableRowBase
{
	GENERATED_BODY()

	/**The item ID used to define the item */
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		FName ItemID;

	/**The object definition belonging to this ID */
	UPROPERTY(Instanced, EditAnywhere, BlueprintReadWrite)
		UItem* InventoryItem;
};

```

While the Item looks a little like this:

```auto
UCLASS(Abstract, BlueprintType, Blueprintable, EditInlineNew, DefaultToInstanced)
class DUNGEONEXPLORER_API UItem : public UObject
{
GENERATED_BODY()

public:
	UItem();

	virtual class UWorld* GetWorld() const { return World; };

	UPROPERTY(Transient)
		class UWorld* World;

	UFUNCTION(BlueprintCallable, Category = "Item")
		bool IsValid();

	/**The item ID used to define the item */
	UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Item")
		FName ItemID;

	...[rest of uproperties]

	virtual void Use(class APlayerCharacterController* Character) PURE_VIRTUAL(UItem, );

	UFUNCTION(BlueprintImplementableEvent)
		void OnUse(class APlayerCharacterController* Character);
};

```

Currently a data table using this struct only shows an ItemID row.
