you could create a array and add the category to the array once a button has been created for it. then each time you would possibly create a new button you check to see if the category is in the array. you would have to be pretty careful when populating the datatable so you don’t have errors, so i would probably use a enumeration for each category.
Note you may need to use the add unique node instead of add.