Modify drop down list conditionally

Hi, there,
I’m trying to modify the values of a dropdown list of a module (AOS_Quotes) based on the value of a module field.
Following the article I learned to modify dropdowns with data taken from custom tables in the DB.
There is the possibility to pass a parameter to the function called in the array of vardef?

I don’t know if this is the right way…

Hi, there,
I am following a different path, the Accounts module is connected with a many to many relationship to my custom module.
I added a ‘relate’ field in the AOS_Quotes module pointing to my custom module.
Now what I would like to do is filter the values in the relate field according to the Account module assigned in the AOS_Quotes module.
Is it possible?