You need to keep in mind variable scope. All your callbacks are functions. Variables created inside a function are lost once the function terminates. The way around this in app designer is to create an app property to capture these values. You can then access them using the app.varName syntax.