How to link an item to a function?

Hi guys,
I am looking for how to link an item to a function, for this realizes a function that I ask.
Do you have any idea?
Thank you