I think you want to refresh the data in the B4XPage_Appear Sub.
After you close a page, the page with old data is still there. When you call B4XPage.ShowPage(".."), the B4XPage_Appear Sub in the page is called.
That is where one usually updates the page dynamically - or refreshes or even load a different layout (after removing all views).
I recommend writing a small project without a database component and test various scenarios. For example:
Sub Class_Globals
Private Root As B4XView 'ignore
Private xui As XUI 'ignore
Private count As Int
Private label1 As Label
End Sub
'You can add more parameters here.
Public Sub Initialize As Object
Return Me
End Sub
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("page1")
End Sub
Private Sub B4XPage_Appear
count = count + 1
If count = 1 Then
label1.Text = "Appear first time"
Else
label1.Text = "Appearance #" & count
End If
End Sub