I'dd suggest to check some of the tutorials on adobe forms and see/learn how the interface interacts with the form, and how to set up the mapping of data between them.
Basically you'd declare in the interface for the receiving & returning parameters of your form. But any parameters you wish to calculate in the interface should be defined there (and then you have the option to map them to your form)