This code works fine for both the galleries. Now when user updates and saves any changes using the edit form command SubmitForm(Form_Ticket), it doesn't get reflected in the form directly even though data is being saved in to the backend SharePoint list. This is due to the fact that Edit form item is still set to "itemSelected" variable which is not getting updated with the latest changes. If user navigates back to gallery and selects the item again, the changes get reflected in the edit form.
Can someone let me know what command I should add to save statement of the form so that after successful data save, the itemSelected is also updated with the latest changes?