Search user in user management

Hi team,

In vision usermanagement, i would like to have a filter or search user by user's input in a text field, i aware that there is a function called filterUser(). But confused on how to use this for the above requirement.
Your help would be appreciated.

I was able to get this to work by using this script on the userManagement tool's filterUser extension function:

#def filterUser(self, user):
	if self.parent.getComponent('Text Field').text in user.get('username'):
		return True
	else:
		return False

Then, to filter the table automatically as the user types, I put this script on the keyReleased event handler of the text field:

userManagement = event.source.parent.getComponent('User Management')
userManagement.updateTables()

Result:
image

2 Likes