Manually Call Extension Functions

How do you call the extension functions on a component manually? Like via a button script calling a power tables extension function or roster management’s filter roster function?

Are you trying to call code that you have written inside the extension functions, or just trying to refresh the component by invoking the extension function externally?

The extension functions are invoked according to specific events on that component. So for filterRole on a user management component, it triggers when a new role is loaded with the management tool.

EDIT If you have something you need to trigger manually, I would do it inside a custom method on the component

I have a few properties that are bounded to a few drop-downs on the window. Then the filterRole uses the values from the window properties to filter the rosters shown in the component.

I want when the drop-downs change for the component to refresh.

I see, I wonder if you create custom properties on the component and bind them to your drop-downs if it would update when they changed? Other than that I’m not sure you can force trigger the extension function without something hacky like scripting it to change the user source then back to the original.

I just found this that you might could try
Roster Management Component Needs Refresh Button - Ignition - Inductive Automation Forum

event.source.parent.getComponent('Roster Management').refreshAvailableList()

Yep I found that and that just refreshes the user list when you go to add users to the roster. Doesn’t refresh the roster list.

But you gave me an idea. I found the refreshAvailableList() function in the SDK and found refreshRosterList()
That is now refreshing the roster lists.

Thank you

1 Like