# Refeshing User Management component

**URL:** <https://forum.inductiveautomation.com/t/refeshing-user-management-component/17467>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [March 22, 2018, 9:18pm UTC](https://forum.inductiveautomation.com/t/refeshing-user-management-component/17467 "2018-03-22T21:18:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![klehman](https://avatars.discourse-cdn.com/v4/letter/k/e68b1a/32.png) [@klehman](https://forum.inductiveautomation.com/u/klehman)\
**Post date:** [March 22, 2018, 9:18pm UTC](https://forum.inductiveautomation.com/t/refeshing-user-management-component/17467/1 "2018-03-22T21:18:32Z")

</div>

I have a filterUser() script, set up, but it only works on the initial load of the component. Has anyone been able to refresh the component via scripting?

I cant seem to make system.db.refresh work, likely because its not an SQL binding.

---

<div class="post-metadata">

**Author:** ![bfuson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bfuson/32/4597_2.png) [@bfuson](https://forum.inductiveautomation.com/u/bfuson)\
**Post date:** [March 22, 2018, 11:40pm UTC](https://forum.inductiveautomation.com/t/refeshing-user-management-component/17467/2 "2018-03-22T23:40:08Z")

</div>

Hello!

Are you talking about the filterUser() extension function on the User Management component?  
If so, that function gets called once per each time a user is added to the component. As you’ve pointed out, that happens when the component first loads. You can force the user management component to reload by calling .updateTables() on it, which will re-filter the users.

I tried this out with a Text Field and a User Management component on a test screen.  
The text field had the following propertyChange event:

```auto
if event.propertyName == 'text':
	um = event.source.parent.getComponent("User Management")
	um.updateTables()

```

And the filterUser function on the manager was:

```auto
	txt = self.parent.getComponent("Text Field").text
	
	if user.get('username') == txt:	
		return True
	else:
		return False

```

Whenever the text field updates, the users get updated and filtered by the content of the text field.

---

<div class="post-metadata">

**Author:** ![klehman](https://avatars.discourse-cdn.com/v4/letter/k/e68b1a/32.png) [@klehman](https://forum.inductiveautomation.com/u/klehman)\
**Post date:** [March 22, 2018, 11:56pm UTC](https://forum.inductiveautomation.com/t/refeshing-user-management-component/17467/3 "2018-03-22T23:56:40Z")

</div>

That’s exactly what I was looking for! Thank you so much!
