common function to initialize data in event popover