Variable in both views

I am stuck trying to pass a variable from one view page to another. I am trying to pass the max value in an array to put in the region calculation on a model view.
I want to assign allDistances.max() to annotationMaxDistance

Thanks I just figured it out by creating a new model class and publishing the variable.