Perspective Set focus in Field of a Specific Instance of a FlexRepeater

Thanks, it worked like a charm.

In my case, the name of the controls are dynamically supplied by the database and might be visible in some rows and others not. Therefore, the next control may vary for each field on each row and is also supplied by the database.
The control namenclature contains the row id so i decided to use that as a payload

This is the call after validation success.

payload = {"FocusControlNext":self.custom.FocusControlNext}
system.perspective.sendMessage("SetFieldFocus",payload=payload,scope='page')

And this is the response to set focus in the SetFieldFocus EventHandler:

#FocusControlNext name sample "tfLine[xx]_Field01"
focusControlNext = payload["FocusControlNext"]
fieldRow = focusControlNext.split('_')[0][6:]
if (fieldRow == str(self.view.params.Row.RowIndex)):
	field = self.getChild(focusControlNext)	
	if not field == None:
		field.focus()
		field.selectAll() #that still does not work... need to find how to make it work
1 Like