Variables in a view

Hi,Maybe a very simple question, but anyway:

How to pass variables between view columns?

e.g., i want to set a variable in one column:

tmpVar := “1”;

and I want to display in the other column of the same view:

tmpVar

but this does not work. any way to do this? and if yes, will it work the same way for a categorized view (parent name)?

Thanks