Creating a system to check if an item already exists in an array - problems with blueprint structures

Hi All. Trying to create a system that checks for whether an item exists inside an array, and if so increases the ‘quantity’ of that item, rather than adding a new entry (A simple inventory system basically).

In the picture below you’ll see I check an ID code of the incoming item against the ID codes of items already in the array, and if they match I add 1 to ‘current stack amount’. However I can’t figure out how to get that information back into the ‘set array element’ node.

My items are defined in a data table, using a structure from ‘S_Items’. But I’ve been using a different structure ‘S_slots’ in order to reference that structure - s_slots gives me the table and row of the items from the data table. Getting from S_slots to S_items is simple - it’s there in the picture, and I go via a ‘get data table row’ node. But how do I got the other way?

The simplest way would be if I can use the information about the item to find it’s row in the data table? But I’m not sure how to go about that. Alternatively I’d have to ditch S_slots but that would involve a lot of re-writing.

  1. instead of use make array and connect all the lines, u can use the “Set members in YourStructName” and just select the pin what u need.

  2. As far as I know, Data tables are Read Only, you cannot change their data, maybe someone can confirm this or not.