Help to call custom method on template repeater from 2 state toggle on a template

Objective is to update selected index on another standard template based on selected 2 state toggle in template repeater.

I need to call a custom method on a template repeater from a 2-state toggle used on the template inside the repeater.

Template repeater method:

def checkReason(self):

	templates = event.source.getLoadedTemplates()
	for template in templates:
		if template.getComponent('poiStatus').IsSelected == 1:
			poi_desc = str(template.poi_desc)
			passList = ["BURN MARK","FLASH","GLASS FIBERS","GATE VESTIGE","SHORT SHOT"]
			if poi_desc in passList:
				#SET TO DAMAGED REASON INDEX
				event.source.parent.getComponent('Reason').selReason = 4

template repeater>template>2-state toggle action performed event handler call to checkReason():

event.source.parent.parent.checkReason()

I have tried with up to 4 parents nested in this call. Still getting error that object has to attribute checkReason. Maybe I’m not understanding the parent part.

Try using

print event.source.parent.parent.parent.name

You probably just need another parent, or 1 fewer.
Printing the type can also help as well e. G. type(event.sourxe......)

Everything past just one parent is coming back as None from the print statement. Just one parent shows the name of the template. Two parents has none instead of the name of the template repeater.

What about the type?