Refresh Repeating Panel with Template

What I do in a similar situation (just deleted a record from inside a repeating panel, need to reload the items), is this (where the server call has all the logic in it to get the items):

self.parent.items = anvil.server.call('get_items')

The parent of the repeating panel item template is the repeating panel itself. If you need to do something with the container the repeating panel is in, add a parent to the chain:

self.parent.parent.raise_event('x-show-page')

You can keep chaining parents, but then the code becomes very sensitive to the nesting layers of your forms.

Edit: I think get_open_form () is best if what you’re doing is completely replacing the contents of a panel, to navigate to a new page for example.

2 Likes