You’ll just need to call the dialog outside of the callback. I don’t know your workflow exactly, but a general-purpose alternative is to set a flag in Session State within a callback and include a check at the beginning of your script for that flag so you can call the dialog at the beginning (like it would be if it had run in a callback). That being said, a dialog is an overlay so it doesn’t really need to “called first;” you should be able to call it anywhere (and reset the flag so it doesn’t keep re-showing).