Help creating list of all items in child tables

I’m new to python and working on a server side script. I need to make a list of the item_name fields of each item attached to the current document in child tables.

Can anyone the right frappe method to get this?

@Dbone

names = []
for table in self.meta.get_table_fields():
     for row in self.get(table.fieldname):
         names.append(row.name)
2 Likes

@Dbone,

names = [item.item_name for item in self.items]

where self.items is the child table field name

Thanks, Makarand

2 Likes

Thanks guys, I solved the problem a different way, but these are great tools to have for the future!