Is it possible to use functions?

I am programming a test in a windows applications which has several processes that use a data grid.

I need to know if there is a chance to program functions than let me make project dynamic.

For example, I need to read and evaluate several grids but for me is very tiring page the sequence in each sections that I need.

For this reason I ask you if there is an activity that let me program a functions which get some parameters and processing a task.

Regards from Mexico City

Maybe a custom activity is what you want.
See: Code Activity - Creating my own algorithms

Adrian.