Material Functions

Maybe a “Function Input” is what you are looking for.

Here is an example:

Especially these pictures should explain the use of a Function Input: