Using output of function in observeEvent as input to global.R in shiny app?

Hi, welcome!

To help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at this guide, to see how to create one for a shiny app

It's hard to give you any specific advice since we don't know the content of your script files, but I think that a better approach would be to define functions instead of sourcing scripts.